Skip to content

Conversation

@alex-au-922
Copy link
Contributor

Added the Occur enum, Query.boolean_query method and corresponding tests.

Expected usage:

@staticmethod
def boolean_query(subqueries: Sequence[tuple[Occur, Query]]) -> Query:
    ...

Query.boolean_query([(Occur.Must, query1), (Occur.MustNot, query2), (Occur.Should, query3)])

Important Changes

  • Added a wrapper struct struct OccurQueryPair(Occur, Query) which lives in the lifetime of the python object subqueries for parsing list of tuple of Occur and Query
  • Added the Clone implementation of Query class for the extract() method to extract Query class from the PyTuple

@cjrh
Copy link
Collaborator

cjrh commented Apr 22, 2024

Thanks!

@cjrh cjrh merged commit 1d61b96 into quickwit-oss:master Apr 22, 2024
cjrh pushed a commit to cjrh/tantivy-py that referenced this pull request Apr 7, 2025
…uickwit-oss#243)

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants