mirror of
https://github.com/meilisearch/meilisearch.git
synced 2024-11-23 10:37:41 +08:00
Fix the tests
This commit is contained in:
parent
34262c7a0d
commit
69f8b2730d
@ -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();
|
||||||
|
@ -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!(
|
||||||
|
@ -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(())
|
||||||
|
Loading…
Reference in New Issue
Block a user