mirror of
https://github.com/meilisearch/MeiliSearch
synced 2024-11-23 05:14:27 +01:00
Catch query tree related errors
This commit is contained in:
parent
9cc3c56c9c
commit
5465e401bb
@ -75,7 +75,7 @@ where
|
|||||||
prefix_postings_lists: prefix_postings_lists_cache_store,
|
prefix_postings_lists: prefix_postings_lists_cache_store,
|
||||||
};
|
};
|
||||||
|
|
||||||
let (operation, mapping) = create_query_tree(reader, &context, query).unwrap();
|
let (operation, mapping) = create_query_tree(reader, &context, query)?;
|
||||||
debug!("operation:\n{:?}", operation);
|
debug!("operation:\n{:?}", operation);
|
||||||
debug!("mapping:\n{:?}", mapping);
|
debug!("mapping:\n{:?}", mapping);
|
||||||
|
|
||||||
@ -90,7 +90,7 @@ where
|
|||||||
let mut queries_kinds = HashMap::new();
|
let mut queries_kinds = HashMap::new();
|
||||||
recurs_operation(&mut queries_kinds, &operation);
|
recurs_operation(&mut queries_kinds, &operation);
|
||||||
|
|
||||||
let QueryResult { docids, queries } = traverse_query_tree(reader, &context, &operation).unwrap();
|
let QueryResult { docids, queries } = traverse_query_tree(reader, &context, &operation)?;
|
||||||
println!("found {} documents", docids.len());
|
println!("found {} documents", docids.len());
|
||||||
println!("number of postings {:?}", queries.len());
|
println!("number of postings {:?}", queries.len());
|
||||||
|
|
||||||
@ -202,7 +202,7 @@ where
|
|||||||
prefix_postings_lists: prefix_postings_lists_cache_store,
|
prefix_postings_lists: prefix_postings_lists_cache_store,
|
||||||
};
|
};
|
||||||
|
|
||||||
let (operation, mapping) = create_query_tree(reader, &context, query).unwrap();
|
let (operation, mapping) = create_query_tree(reader, &context, query)?;
|
||||||
debug!("operation:\n{:?}", operation);
|
debug!("operation:\n{:?}", operation);
|
||||||
debug!("mapping:\n{:?}", mapping);
|
debug!("mapping:\n{:?}", mapping);
|
||||||
|
|
||||||
@ -217,7 +217,7 @@ where
|
|||||||
let mut queries_kinds = HashMap::new();
|
let mut queries_kinds = HashMap::new();
|
||||||
recurs_operation(&mut queries_kinds, &operation);
|
recurs_operation(&mut queries_kinds, &operation);
|
||||||
|
|
||||||
let QueryResult { docids, queries } = traverse_query_tree(reader, &context, &operation).unwrap();
|
let QueryResult { docids, queries } = traverse_query_tree(reader, &context, &operation)?;
|
||||||
println!("found {} documents", docids.len());
|
println!("found {} documents", docids.len());
|
||||||
println!("number of postings {:?}", queries.len());
|
println!("number of postings {:?}", queries.len());
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user