Skip to content

Commit

Permalink
Updated docs about MeiliDocumentContainer
Browse files Browse the repository at this point in the history
  • Loading branch information
ahmednfwela committed Feb 17, 2024
1 parent 5274a1c commit 1684d25
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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<T>` 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.
Expand Down

0 comments on commit 1684d25

Please sign in to comment.