Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

expose regex query #241

Merged
merged 3 commits into from
Apr 25, 2024
Merged

Conversation

alex-au-922
Copy link
Contributor

Exposed the regex query function based on the rust version's crate documentation.

Expected usage:

@staticmethod
def regex_query(schema: Schema, field_name: str, regex_pattern: str) -> Query:
    ...

query = Query.regex_query(index.schema, "body", "fish")

Raises error if the field name doesn't found, or the regex pattern is not valid.

Currently this query must be created outside from the query parser

@cjrh cjrh added rust Pull requests that update Rust code feature-parity Feature parity with upstream tantivy labels Apr 21, 2024
@cjrh
Copy link
Collaborator

cjrh commented Apr 22, 2024

@alex-au-922 If you can fix up the conflicts (from merging your other BooleanQuery PR) I'll merge this one as well.

@alex-au-922
Copy link
Contributor Author

Thanks, will fix it soon

@cjrh
Copy link
Collaborator

cjrh commented Apr 22, 2024

All good, I'm not rushing you 😄 . Whenever you have time.

@cjrh
Copy link
Collaborator

cjrh commented Apr 24, 2024

Oops sorry for the conflicts again. Should I have merged this one before boost query?

Anyway, we're getting there. After the conflicts are fixed here we can merge this too.

@alex-au-922
Copy link
Contributor Author

alex-au-922 commented Apr 24, 2024

I have updated the conflicts with boost query now. Thanks!

@wallies wallies merged commit 5c36663 into quickwit-oss:master Apr 25, 2024
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature-parity Feature parity with upstream tantivy rust Pull requests that update Rust code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants