Skip to content

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.
@jpountz
Copy link
Contributor Author

jpountz commented Feb 26, 2025

After discussing with @rmuir on options when fields don't have the same analyzer, index options, etc. I'm leaning towards only supporting BM25F for now. There is simply no good way of scoring on multiple fields when they are indexed differently.

Copy link
Contributor

This PR has not had activity in the past 2 weeks, labeling it as stale. If the PR is waiting for review, notify the [email protected] list. Thank you for your contribution!

Copy link
Contributor

This PR has not had activity in the past 2 weeks, labeling it as stale. If the PR is waiting for review, notify the [email protected] list. Thank you for your contribution!

@github-actions github-actions bot added the Stale label Apr 25, 2025
@github-actions github-actions bot removed the Stale label Oct 1, 2025
Copy link
Contributor

This PR has not had activity in the past 2 weeks, labeling it as stale. If the PR is waiting for review, notify the [email protected] list. Thank you for your contribution!

@github-actions github-actions bot added the Stale label Oct 16, 2025
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.

2 participants