mirror of
https://github.com/meilisearch/MeiliSearch
synced 2025-07-03 20:07:09 +02:00
Index document in filterable attributes tests
**Reason:** Because the filterable attributes are patterns now, the fieldIdMap will only register the fields that exists in at least one document. if a field doesn't exist in any document, it will not be registered even if it has been specified in the filterable fields.
This commit is contained in:
parent
9a75dc6ab3
commit
6dbec91d2b
3 changed files with 35 additions and 14 deletions
|
@ -3604,22 +3604,28 @@ async fn federation_non_faceted_for_an_index() {
|
|||
|
||||
let index = server.index("fruits");
|
||||
|
||||
let documents = FRUITS_DOCUMENTS.clone();
|
||||
let (value, _) = index.add_documents(documents, None).await;
|
||||
index.wait_task(value.uid()).await.succeeded();
|
||||
|
||||
let (value, _) = index
|
||||
.update_settings(
|
||||
json!({"searchableAttributes": ["name"], "filterableAttributes": ["BOOST", "id", "name"]}),
|
||||
)
|
||||
.await;
|
||||
|
||||
index.wait_task(value.uid()).await.succeeded();
|
||||
|
||||
let index = server.index("fruits-no-name");
|
||||
|
||||
let documents = FRUITS_DOCUMENTS.clone();
|
||||
let (value, _) = index.add_documents(documents, None).await;
|
||||
index.wait_task(value.uid()).await.succeeded();
|
||||
|
||||
let (value, _) = index
|
||||
.update_settings(
|
||||
json!({"searchableAttributes": ["name"], "filterableAttributes": ["BOOST", "id"]}),
|
||||
)
|
||||
.await;
|
||||
|
||||
index.wait_task(value.uid()).await.succeeded();
|
||||
|
||||
let index = server.index("fruits-no-facets");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue