Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions learn/resources/experimental_features_overview.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -59,3 +59,4 @@ Activating or deactivating experimental features this way does not require you t
| [Search query embedding cache](/learn/self_hosted/configure_meilisearch_at_launch#search-query-embedding-cache) | Enable a cache for search query embeddings | CLI flag or environment variable |
| [Uncompressed snapshots](/learn/self_hosted/configure_meilisearch_at_launch#uncompressed-snapshots) | Disable snapshot compaction | CLI flag or environment variable |
| [Maximum batch payload size](/learn/self_hosted/configure_meilisearch_at_launch#maximum-batch-payload-size) | Limit batch payload size | CLI flag or environment variable |
| [Disable new indexer](/learn/self_hosted/configure_meilisearch_at_launch) | Use previous settings indexer | CLI flag or environment variable |
12 changes: 12 additions & 0 deletions learn/self_hosted/configure_meilisearch_at_launch.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -538,6 +538,18 @@ Helps running Meilisearch in cluster environments. It does this by modifying tas
- Allows you to manually set task uids by adding a custom `TaskId` header to your API requests
- Allows you to dry register tasks by specifying a `DryRun: true` header in your request

### Disable new indexer <NoticeTag type="experimental" label="experimental" />

<Warning>
🚩 This option does not take any values. Assigning a value will throw an error. 🚩
</Warning>

**Environment variable**: `MEILI_EXPERIMENTAL_NO_EDITION_2024_FOR_SETTINGS`<br />
**CLI option**: `--experimental-no-edition-2024-for-settings`<br />
**Default value**: `None`<br />

Falls back to previous settings indexer.

### SSL options

#### SSL authentication path
Expand Down
2 changes: 1 addition & 1 deletion snippets/samples/code_samples_add_movies_json_1.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ file, _ := os.ReadFile("movies.json")
var movies interface{}
json.Unmarshal([]byte(file), &movies)

client.Index("movies").AddDocuments(&movies)
client.Index("movies").AddDocuments(&movies, nil)
```

```csharp C#
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ documents := []map[string]interface{}{
"release_date": "2019-03-23",
},
}
client.Index("movies").AddDocuments(documents)
client.Index("movies").AddDocuments(documents, nil)
```

```csharp C#
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ documents := []map[string]interface{}{
"genres": "comedy",
},
}
client.Index("movies").UpdateDocuments(documents)
client.Index("movies").UpdateDocuments(documents, nil)
```

```csharp C#
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ await client.GetTasksAsync(new TasksQuery { Statuses = new List<TaskInfoStatus>
```rust Rust
let mut query = TasksQuery::new(&client);
let tasks = query
.with_statuses(["failed", "canceled"])
.with_statuses(["failed"])
.execute()
.await
.unwrap();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,13 @@
curl \
-X GET 'MEILISEARCH_URL/tasks?statuses=failed,canceled'
```

```rust Rust
let mut query = TasksQuery::new(&client);
let tasks = query
.with_statuses(["failed", "canceled"])
.execute()
.await
.unwrap();
```
</CodeGroup>
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,12 @@ curl \
"primaryKey": "id"
}'
```

```rust Rust
let client = Client::new("http://localhost:7700", Some("DEFAULT_ADMIN_API_KEY"));
let task = client
.create_index("medical_records", Some("id"))
.await
.unwrap();
```
</CodeGroup>
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,12 @@
curl -X GET 'MEILISEARCH_URL/keys' \
-H 'Authorization: Bearer MASTER_KEY'
```

```rust Rust
let client = Client::new("http://localhost:7700", Some("MASTER_KEY"));
client
.get_keys()
.await
.unwrap();
```
</CodeGroup>
11 changes: 11 additions & 0 deletions snippets/samples/code_samples_basic_security_tutorial_search_1.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,15 @@ curl \
-H 'Authorization: Bearer DEFAULT_SEARCH_API_KEY' \
--data-binary '{ "q": "appointments" }'
```

```rust Rust
let client = Client::new("http://localhost:7700", Some("DEFAULT_SEARCH_API_KEY"));
let index = client.index("medical_records");
index
.search()
.with_query("appointments")
.execute::<MedicalRecord>()
.await
.unwrap();
```
</CodeGroup>
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ client.index('games').update_filterable_attributes(['release_timestamp'])
```

```go Go
filterableAttributes := []string{"release_timestamp"}
filterableAttributes := []interface{}{"release_timestamp"}
client.Index("games").UpdateFilterableAttributes(&filterableAttributes)
```

Expand Down
2 changes: 1 addition & 1 deletion snippets/samples/code_samples_date_guide_index_1.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ byteValue, _ := io.ReadAll(jsonFile)
var games []map[string]interface{}
json.Unmarshal(byteValue, &games)

client.Index("games").AddDocuments(games)
client.Index("games").AddDocuments(games, nil)
```

```csharp C#
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ client.index('products').update_filterable_attributes([
```

```go Go
filterableAttributes := []string{
filterableAttributes := []interface{}{
"product_id",
"sku",
"url",
Expand Down
10 changes: 10 additions & 0 deletions snippets/samples/code_samples_facet_search_1.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,16 @@ var query = new SearchFacetsQuery()
await client.Index("books").FacetSearchAsync("genres", query);
```

```rust Rust
let res = client.index("books")
.facet_search("genres")
.with_facet_query("fiction")
.with_filter("rating > 3")
.execute()
.await
.unwrap();
```

```dart Dart
await client.index('books').facetSearch(
FacetSearchQuery(
Expand Down
14 changes: 14 additions & 0 deletions snippets/samples/code_samples_facet_search_2.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,20 @@ var newFaceting = new Faceting
await client.Index("books").UpdateFacetingAsync(newFaceting);
```

```rust Rust
let mut facet_sort_setting = BTreeMap::new();
facet_sort_setting.insert("genres".to_string(), FacetSortValue::Count);
let faceting = FacetingSettings {
max_values_per_facet: 100,
sort_facet_values_by: Some(facet_sort_setting),
};

let res = client.index("books")
.set_faceting(&faceting)
.await
.unwrap();
```

```dart Dart
await client.index('books').updateFaceting(
Faceting(
Expand Down
10 changes: 10 additions & 0 deletions snippets/samples/code_samples_facet_search_3.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ client.index('books').facet_search('genres', 'c')
client.Index("books").FacetSearch(&meilisearch.FacetSearchRequest{
FacetQuery: "c",
FacetName: "genres",
ExhaustiveFacetCount: true
})
```

Expand All @@ -53,6 +54,15 @@ var query = new SearchFacetsQuery()
await client.Index("books").FacetSearchAsync("genres", query);
```

```rust Rust
let res = client.index("books")
.facet_search("genres")
.with_facet_query("c")
.execute()
.await
.unwrap();
```

```dart Dart
await client.index('books').facetSearch(
FacetSearchQuery(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ client.index('movie_ratings').update_filterable_attributes(['genres', 'rating',
```

```go Go
filterableAttributes := []string{
filterableAttributes := []interface{}{
"genres",
"rating",
"language",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ client.index('movies').update_filterable_attributes([
```

```go Go
resp, err := client.Index("movies").UpdateFilterableAttributes(&[]string{
resp, err := client.Index("movies").UpdateFilterableAttributes(&[]interface{}{
"director",
"genres",
})
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ client.index('restaurants').update_filterable_attributes(['_geo'])
```

```go Go
filterableAttributes := []string{
filterableAttributes := []interface{}{
"_geo",
}
client.Index("restaurants").UpdateFilterableAttributes(&filterableAttributes)
Expand Down
4 changes: 4 additions & 0 deletions snippets/samples/code_samples_get_all_batches_1.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,8 @@ $client->getBatches();
```ruby Ruby
client.batches
```

```go Go
client.GetBatches();
```
</CodeGroup>
4 changes: 4 additions & 0 deletions snippets/samples/code_samples_get_batch_1.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,8 @@ $client->getBatch(BATCH_UID);
```ruby Ruby
client.batch(BATCH_UID)
```

```go Go
client.GetBatch(BATCH_UID);
```
</CodeGroup>
4 changes: 4 additions & 0 deletions snippets/samples/code_samples_get_embedders_1.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,8 @@ curl \
```ruby Ruby
client.index('INDEX_NAME').embedders
```

```rust Rust
let embedders = index.get_embedders().await.unwrap();
```
</CodeGroup>
8 changes: 8 additions & 0 deletions snippets/samples/code_samples_get_facet_search_settings_1.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,12 @@ client.index('INDEX_UID').facet_search_setting
```go Go
client.Index("books").GetFacetSearch()
```

```rust Rust
let facet_search: bool = client
.index(INDEX_UID)
.get_facet_search()
.await
.unwrap();
```
</CodeGroup>
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,12 @@ client.index('INDEX_UID').prefix_search
```go Go
client.Index("books").GetPrefixSearch()
```

```rust Rust
let prefix_search: PrefixSearchSettings = client
.index(INDEX_UID)
.get_prefix_search()
.await
.unwrap();
```
</CodeGroup>
8 changes: 8 additions & 0 deletions snippets/samples/code_samples_get_similar_post_1.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -39,4 +39,12 @@ client.Index("INDEX_NAME").SearchSimilarDocuments(&meilisearch.SimilarDocumentQu
Embedder: "default",
}, resp)
```

```rust Rust
let results = index
.similar_search("TARGET_DOCUMENT_ID", "EMBEDDER_NAME")
.execute()
.await
.unwrap();
```
</CodeGroup>
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ func main() {
var movies []map[string]interface{}
json.Unmarshal(byteValue, &movies)

_, err := client.Index("movies").AddDocuments(movies)
_, err := client.Index("movies").AddDocuments(movies, nil)
if err != nil {
panic(err)
}
Expand Down Expand Up @@ -192,7 +192,7 @@ namespace Meilisearch_demo
```text Rust
// In your .toml file:
[dependencies]
meilisearch-sdk = "0.28.0"
meilisearch-sdk = "0.29.1"
# futures: because we want to block on futures
futures = "0.3"
# serde: required if you are going to use documents
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ byteValue, _ := io.ReadAll(jsonFile)
var meteorites []map[string]interface{}
json.Unmarshal(byteValue, &meteorites)

client.Index("meteorites").AddDocuments(meteorites)
client.Index("meteorites").AddDocuments(meteorites, nil)
```

```csharp C#
Expand Down
3 changes: 3 additions & 0 deletions snippets/samples/code_samples_getting_started_faceting.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -78,8 +78,11 @@ await client.Index("movies").UpdateFacetingAsync(faceting);
```

```rust Rust
let mut facet_sort_setting = BTreeMap::new();
facet_sort_setting.insert("*".to_string(), FacetSortValue::Count);
let mut faceting = FacetingSettings {
max_values_per_facet: 2,
sort_facet_values_by: Some(facet_sort_setting),
};

let task: TaskInfo = client
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,11 @@
curl \
-X GET 'MEILISEARCH_URL/indexes/INDEX_NAME/settings/searchable-attributes'
```

```rust Rust
let searchable_attributes: Vec<String> = index
.get_searchable_attributes()
.await
.unwrap();
```
</CodeGroup>
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,11 @@ curl \
"overview"
]'
```

```rust Rust
let task = index
.set_searchable_attributes(["title", "overview"])
.await
.unwrap();
```
</CodeGroup>
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,8 @@
curl \
-X GET 'MEILISEARCH_URL/tasks/TASK_UID'
```

```rust Rust
let task_status = index.get_task(&task).await.unwrap();
```
</CodeGroup>
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ documents := []map[string]interface{}{
{ "id": 5, "title": "Moana" },
{ "id": 6, "title": "Philadelphia" },
}
client.Index("movies").AddDocuments(documents)
client.Index("movies").AddDocuments(documents, nil)
```

```csharp C#
Expand Down
Loading