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

Add field_boosts and fuzzy_fields optional parameters to Index::parse_query #202

Merged
merged 2 commits into from
Feb 5, 2024

Conversation

adamreichold
Copy link
Collaborator

@adamreichold adamreichold commented Feb 1, 2024

An alternative approach to expose this functionality of QueryParser using Python-specific facilities, i.e. optional keyword arguments, instead of exactly mirroring the Rust API and exposing QueryParser as a separate #[pyclass].

Closes #201
Closes #50

@cjrh cjrh mentioned this pull request Feb 1, 2024
@adamreichold adamreichold force-pushed the field-boost-fuzzy branch 2 times, most recently from 583406f to 5c390b5 Compare February 1, 2024 16:08
@safwansamsudeen
Copy link

safwansamsudeen commented Feb 4, 2024

@adamreichold @cjrh this works for me, atleast the fuzzy bit. The boosting doesn't seem to work, but perhaps that's a Tantivy issue.

Also, the snippet generator breaks with fuzzy queries. Is that normal?

Also, a huge thank you for getting this done so quickly.

@adamreichold
Copy link
Collaborator Author

The boosting doesn't seem to work, but perhaps that's a Tantivy issue.

Did you check whether the repr contain the expected boost factors?

Also, the snippet generator breaks with fuzzy queries. Is that normal?

I think this is a limitation of how the snippet generator works ATM, i.e. it second guesses the query and finds occurrences instead of being integrated into the query execution. Since it does not consider fuzzy matches, I cannot find them. You probably need to provide a fallback for such queries in your UI.

src/index.rs Outdated Show resolved Hide resolved
@cjrh cjrh merged commit e95a456 into master Feb 5, 2024
10 checks passed
@cjrh cjrh mentioned this pull request Mar 26, 2024
cjrh pushed a commit to cjrh/tantivy-py that referenced this pull request Sep 3, 2024
…234b8f96b7ae60248 to dc6353516c68da0f06325f42ad880f76a5e77ec9 (quickwit-oss#202)

Signed-off-by: dependabot[bot] <support@github.com>
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.

Accessing QueryParser Adding boost/weight to fields
3 participants