Update milli/tests/search/query_criteria.rs

Co-authored-by: Clément Renault <clement@meilisearch.com>
This commit is contained in:
Many 2021-06-08 14:24:17 +02:00 committed by many
parent b64cd2a3e3
commit afb09c914d
No known key found for this signature in database
GPG Key ID: 2CEF23B75189EACA
2 changed files with 4 additions and 3 deletions

View File

@ -29,9 +29,7 @@ pub fn setup_search_index_with_criteria(criteria: &[Criterion]) -> Index {
builder.set_criteria(criteria);
builder.set_filterable_fields(hashset!{
S("tag"),
S("unexisting_field"),
S("asc_desc_rank"),
S("unexisting_field"),
});
builder.set_synonyms(hashmap!{
S("hello") => vec![S("good morning")],

View File

@ -203,7 +203,10 @@ fn criteria_mixup() {
let SearchResult { documents_ids, .. } = search.execute().unwrap();
let expected_external_ids: Vec<_> = search::expected_order(&criteria, ALLOW_OPTIONAL_WORDS, ALLOW_TYPOS).into_iter().map(|d| d.id).collect();
let expected_external_ids: Vec<_> = search::expected_order(&criteria, ALLOW_OPTIONAL_WORDS, ALLOW_TYPOS)
.into_iter()
.map(|d| d.id)
.collect();
let documents_ids = search::internal_to_external_ids(&index, &documents_ids);
assert_eq!(documents_ids, expected_external_ids);