Fix the tests

This commit is contained in:
Clément Renault 2024-03-26 18:07:43 +01:00
parent 34262c7a0d
commit 69f8b2730d
No known key found for this signature in database
GPG Key ID: F250A4C4E3AE5F5F
3 changed files with 3 additions and 2 deletions

View File

@ -2435,6 +2435,7 @@ pub(crate) mod tests {
document_scores: _, document_scores: _,
mut documents_ids, mut documents_ids,
degraded: _, degraded: _,
used_negative_operator: _,
} = search.execute().unwrap(); } = search.execute().unwrap();
let primary_key_id = index.fields_ids_map(&rtxn).unwrap().id("primary_key").unwrap(); let primary_key_id = index.fields_ids_map(&rtxn).unwrap().id("primary_key").unwrap();
documents_ids.sort_unstable(); documents_ids.sort_unstable();

View File

@ -261,7 +261,7 @@ pub(crate) mod tests {
let mut builder = TokenizerBuilder::default(); let mut builder = TokenizerBuilder::default();
let tokenizer = builder.build(); let tokenizer = builder.build();
let tokens = tokenizer.tokenize("split this world"); let tokens = tokenizer.tokenize("split this world");
let query_terms = located_query_terms_from_tokens(&mut ctx, tokens, None).unwrap(); let (query_terms, _) = located_query_terms_from_tokens(&mut ctx, tokens, None).unwrap();
let matching_words = MatchingWords::new(ctx, query_terms); let matching_words = MatchingWords::new(ctx, query_terms);
assert_eq!( assert_eq!(

View File

@ -331,7 +331,7 @@ mod tests {
let rtxn = index.read_txn()?; let rtxn = index.read_txn()?;
let mut ctx = SearchContext::new(&index, &rtxn); let mut ctx = SearchContext::new(&index, &rtxn);
// panics with `attempt to add with overflow` before <https://github.com/meilisearch/meilisearch/issues/3785> // panics with `attempt to add with overflow` before <https://github.com/meilisearch/meilisearch/issues/3785>
let located_query_terms = located_query_terms_from_tokens(&mut ctx, tokens, None)?; let (located_query_terms, _) = located_query_terms_from_tokens(&mut ctx, tokens, None)?;
assert!(located_query_terms.is_empty()); assert!(located_query_terms.is_empty());
Ok(()) Ok(())