diff --git a/meilidb-core/src/query_builder.rs b/meilidb-core/src/query_builder.rs index 5325e6eb7..ce427698a 100644 --- a/meilidb-core/src/query_builder.rs +++ b/meilidb-core/src/query_builder.rs @@ -31,18 +31,25 @@ fn generate_automatons(query: &str, store: &S) -> Result(query: &str, store: &S) -> Result { + assert_eq!(matches.len(), 1); + let match_ = matches[0]; + assert_eq!(match_.query_index, 0); + assert_eq!(match_.word_index, 0); + }); assert_matches!(iter.next(), None); let builder = QueryBuilder::new(&store); let results = builder.query("bonj blabla", 0..20).unwrap(); let mut iter = results.into_iter(); + assert_matches!(iter.next(), Some(Document { id: DocumentId(0), matches }) => { + assert_eq!(matches.len(), 1); + let match_ = matches[0]; + assert_eq!(match_.query_index, 0); + assert_eq!(match_.word_index, 0); + }); assert_matches!(iter.next(), None); }