Closed aecio closed 5 months ago
This PR adds the Query.term_set_query method and corresponding tests.
Query.term_set_query
Expected usage:
terms = ["old", "man"] query = Query.term_set_query(index.schema, "title", terms) result = index.searcher().search(query, 10)
The new term_set_query method has a signature similar to the existing term_query:
term_set_query
term_query
@staticmethod def term_query(schema: Schema, field_name: str, field_value: Any, index_option: str = "position") -> Query: pass @staticmethod def term_set_query(schema: Schema, field_name: str, field_values: Sequence[Any]) -> Query: pass
See also issue https://github.com/quickwit-oss/tantivy-py/issues/20.
This PR adds the
Query.term_set_query
method and corresponding tests.Expected usage:
The new
term_set_query
method has a signature similar to the existingterm_query
:See also issue https://github.com/quickwit-oss/tantivy-py/issues/20.