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 support for querying multiple fields to QueryBuilder. #14262

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

jpountz
Copy link
Contributor

@jpountz jpountz commented Feb 19, 2025

QueryBuilder#createBooleanQuery now supports querying multiple fields. Scoring-wise, it supports two options: either BM25F, the best choice but requires fields to be indexed/searched with the same analyzer, index options and similarity, or taking the max score across fields, a poor option but that doesn't make any assumption about how fields are indexed/searched.

To make it work properly, I added support for multiple terms back to CombinedFieldQuery (like in sandbox) to support synonyms.

`QueryBuilder#createBooleanQuery` now supports querying multiple fields.
Scoring-wise, it supports two options: either BM25F, the best choice but
requires fields to be indexed/searched with the same analyzer, index
options and similarity, or taking the max score across fields, a poor
option but that doesn't make any assumption about how fields are
indexed/searched.

To make it work properly, I added support for multiple terms back to
`CombinedFieldQuery` (like in sandbox) to support synonyms.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant