Update examples/json_field.rs

This commit is contained in:
PSeitz
2022-05-23 11:39:45 +02:00
committed by GitHub
parent 4e2a053b69
commit 0aa3d63a9f

View File

@@ -75,7 +75,7 @@ fn main() -> tantivy::Result<()> {
assert_eq!(hits.len(), 1);
}
{
// The default json fields need to be prefixed by the path
// The sub-fields in the json field marked as default field still need to be explicitly addressed
let query = query_parser.parse_query("click AND 133")?;
let hits = searcher.search(&*query, &TopDocs::with_limit(2))?;
assert_eq!(hits.len(), 0);