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 the Combined Fields query type (to 8.x branch) #2196

Merged
merged 1 commit into from
Mar 18, 2024

Conversation

mparker17
Copy link
Contributor

The Combined Fields query was introduced in ElasticSearch 7.13.

See
https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl-combined-fields-query.html for more information.

Fixes #2195

@mparker17 mparker17 changed the title Add support for the Combined Fields query type. Add support for the Combined Fields query type (to 8.x branch) Mar 1, 2024
Copy link
Owner

@ruflin ruflin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Change LGTM.

$combinedFields = new CombinedFields();
$combinedFields->setQuery('Tristan Maindron');
$combinedFields->setFields(['title', 'body', 'abstract']);
$combinedFields->setMinimumShouldMatch('2<100%');
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Interesting one, was not aware of this syntax. Something learned today: https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl-minimum-should-match.html

@ruflin ruflin merged commit 78d5a9e into ruflin:8.x Mar 18, 2024
19 checks passed
@ruflin
Copy link
Owner

ruflin commented Mar 18, 2024

@mparker17 Thank you for the contribution!

@mparker17 mparker17 deleted the 8x-combined-fields-query branch April 1, 2024 19:54
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.

Support the Combined Fields query type
2 participants