diff --git a/examples/json_field.rs b/examples/json_field.rs index f625abc5e..bcbf3ea4d 100644 --- a/examples/json_field.rs +++ b/examples/json_field.rs @@ -52,6 +52,7 @@ fn main() -> tantivy::Result<()> { let searcher = reader.searcher(); // # Default fields: event_type and attributes + // By setting attributes as a default field it allows omitting attributes itself, e.g. "target", instead of "attributes.target" let query_parser = QueryParser::for_index(&index, vec![event_type, attributes]); { let query = query_parser.parse_query("target:submit-button")?;