Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix cross_fields type on multi_match query with synonyms (#21638)
* Fix cross_fields type on multi_match query with synonyms This change fixes the cross_fields type of the multi_match query when synonyms are involved. Since 2.x the Lucene query parser creates SynonymQuery for words that appear at the same position. For simple term query the CrossFieldsQueryBuilder expands the term to all requested fields and creates a BlendedTermQuery. This change adds the same mechanism for SynonymQuery which otherwise are not expanded to all requested fields. As a side note I wonder if we should not replace the BlendedTermQuery with the SynonymQuery. They have the same purpose and behave similarly. Fixes #21633 * Fallback to SynonymQuery for blended terms on a single field
- Loading branch information
Showing
3 changed files
with
114 additions
and
34 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters