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

Fix Slop Issue in MultiFieldQueryParser #12196

Merged
merged 3 commits into from
Mar 8, 2023
Merged

Conversation

jasirkt
Copy link
Contributor

@jasirkt jasirkt commented Mar 8, 2023

Description

This change fixes #12195.

In Lucene 5.4.0 this commit introduced some changes for immutability of queries. setBoost() function was replaced with new BoostQuery(), but BoostQuery is not handled in setSlop function. This pull request adds the handling of BoostQuery in setSlop() function

@rmuir
Copy link
Member

rmuir commented Mar 8, 2023

thank you for tracking this down: is there a simple unit test we could add for the change?

@jasirkt
Copy link
Contributor Author

jasirkt commented Mar 8, 2023

@rmuir I've added a unit test.

@rmuir rmuir merged commit 96efb34 into apache:main Mar 8, 2023
asfgit pushed a commit that referenced this pull request Mar 8, 2023
In Lucene 5.4.0 62313b83ba9c69379e1f84dffc881a361713ce9 introduced some changes for immutability of queries. setBoost() function was replaced with new BoostQuery(), but BoostQuery is not handled in setSlop function. This commit adds the handling of BoostQuery in setSlop() function.
@rmuir rmuir added this to the 9.6.0 milestone Mar 8, 2023
@rmuir
Copy link
Member

rmuir commented Mar 8, 2023

Thank you for the fix @jasirkt

@jasirkt jasirkt deleted the bugfix_mfqp_slop branch March 9, 2023 03:00
@jasirkt
Copy link
Contributor Author

jasirkt commented Mar 9, 2023

Welcome @rmuir

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.

Slop is missing when boost is passed to MultiFieldQueryParser (Since Lucene 5.4.0)
2 participants