From 856c50dffcb1b9b1608705d600a8731cf8114753 Mon Sep 17 00:00:00 2001 From: Ahmed Fwela Date: Sat, 17 Feb 2024 13:42:15 +0200 Subject: [PATCH 1/3] docs: Add readme section about dio --- README.md | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index d3858d3..58d7cee 100644 --- a/README.md +++ b/README.md @@ -28,12 +28,14 @@ **Meilisearch** is an open-source search engine. [Learn more about Meilisearch.](https://github.com/meilisearch/meilisearch) -## Table of Contents +## Table of Contents - [📖 Documentation](#-documentation) - [⚡ Supercharge your Meilisearch experience](#-supercharge-your-meilisearch-experience) - [🔧 Installation](#-installation) - [🚀 Getting started](#-getting-started) +- [Advanced Configuration](#advanced-configuration) + - [Customizing the dio instance](#customizing-the-dio-instance) - [🤖 Compatibility with Meilisearch](#-compatibility-with-meilisearch) - [💡 Learn more](#-learn-more) - [⚙️ Contributing](#️-contributing) @@ -198,6 +200,12 @@ await index.search('wonder', filter: ['id > 1 AND genres = Action']); } ``` +## Advanced Configuration + +### Customizing the dio instance + +Meilisearch uses [dio](https://pub.dev/packages/dio) internally to send requests, you can provide it with your own interceptors or adapter useing the `MeiliSearchClient.withCustomDio` constructor. + ## 🤖 Compatibility with Meilisearch This package guarantees compatibility with [version v1.x of Meilisearch](https://github.com/meilisearch/meilisearch/releases/tag/latest), but some features may not be present. Please check the [issues](https://github.com/meilisearch/meilisearch-dart/issues?q=is%3Aissue+is%3Aopen+label%3A%22good+first+issue%22+label%3Aenhancement) for more info. From 5274a1c02980e2b22895f261aa5fbcdedcd4f8da Mon Sep 17 00:00:00 2001 From: Ahmed Fwela Date: Sat, 17 Feb 2024 13:43:51 +0200 Subject: [PATCH 2/3] typo --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 58d7cee..d2d8718 100644 --- a/README.md +++ b/README.md @@ -204,7 +204,7 @@ await index.search('wonder', filter: ['id > 1 AND genres = Action']); ### Customizing the dio instance -Meilisearch uses [dio](https://pub.dev/packages/dio) internally to send requests, you can provide it with your own interceptors or adapter useing the `MeiliSearchClient.withCustomDio` constructor. +Meilisearch uses [dio](https://pub.dev/packages/dio) internally to send requests, you can provide it with your own interceptors or adapter using the `MeiliSearchClient.withCustomDio` constructor. ## 🤖 Compatibility with Meilisearch From 1684d25f9f5e18608fe8dce6c5dcbbbcb65b5f68 Mon Sep 17 00:00:00 2001 From: Ahmed Fwela Date: Sat, 17 Feb 2024 14:06:07 +0200 Subject: [PATCH 3/3] Updated docs about MeiliDocumentContainer --- README.md | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/README.md b/README.md index d2d8718..5dc8152 100644 --- a/README.md +++ b/README.md @@ -36,6 +36,7 @@ - [🚀 Getting started](#-getting-started) - [Advanced Configuration](#advanced-configuration) - [Customizing the dio instance](#customizing-the-dio-instance) + - [Using MeiliDocumentContainer](#using-meilidocumentcontainer) - [🤖 Compatibility with Meilisearch](#-compatibility-with-meilisearch) - [💡 Learn more](#-learn-more) - [⚙️ Contributing](#️-contributing) @@ -206,6 +207,19 @@ await index.search('wonder', filter: ['id > 1 AND genres = Action']); Meilisearch uses [dio](https://pub.dev/packages/dio) internally to send requests, you can provide it with your own interceptors or adapter using the `MeiliSearchClient.withCustomDio` constructor. +### Using MeiliDocumentContainer + +The `MeiliDocumentContainer` class contains meilisearch-specific fields (e.g. `rankingScoreDetails`, `_formatted`, `matchesPosition`, etc...). + +We define the `mapToContainer()` extension to help you quickly opt-in to this class, example: + +```dart +final res = await index + .search("hello world") + .asSearchResult() //or .asPaginatedResult() if using page parameters + .mapToContainer(); +``` + ## 🤖 Compatibility with Meilisearch This package guarantees compatibility with [version v1.x of Meilisearch](https://github.com/meilisearch/meilisearch/releases/tag/latest), but some features may not be present. Please check the [issues](https://github.com/meilisearch/meilisearch-dart/issues?q=is%3Aissue+is%3Aopen+label%3A%22good+first+issue%22+label%3Aenhancement) for more info.