Skip to content

combined_fields cannot be used be in query_string query. Can we add this functionality #75909

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

Closed
lasagar opened this issue Jul 31, 2021 · 4 comments
Labels
>enhancement :Search/Search Search-related issues that do not fall into other categories Team:Search Meta label for search team

Comments

@lasagar
Copy link

lasagar commented Jul 31, 2021

Per the below posts, combined_fields is introduced to solve the negative IDF in cross_fields. Currently we are using query_string with cross_fields, similar to that can we have combined_fields to be used as a type in query_string.

#71213

#41106

@lasagar lasagar added >enhancement needs:triage Requires assignment of a team area label labels Jul 31, 2021
@jtibshirani jtibshirani added :Search/Search Search-related issues that do not fall into other categories and removed needs:triage Requires assignment of a team area label labels Aug 2, 2021
@elasticmachine elasticmachine added the Team:Search Meta label for search team label Aug 2, 2021
@elasticmachine
Copy link
Collaborator

Pinging @elastic/es-search (Team:Search)

@heebj
Copy link

heebj commented Dec 3, 2021

Are there any plans for this? It would be very helpful in our use case where cross_fields leads to wrong scoring.

@heebj
Copy link

heebj commented Jun 20, 2022

Any news on this @lasagar ?

@jtibshirani
Copy link
Contributor

When designing the combined_fields query, we decided that it should only work when all fields have the same analyzer. This is because when fields have different analyzers, there's not a single good way to tokenize the query and compute the combined field score.

For this reason, it doesn't seem like combined_fields is a good fit for use in query_string. By default, query_string searches over all fields. But combined_fields can't handle fields with different analyzers (or any non-text based field!) so it would often throw an error. We are thinking about better ways to handle fields with different analyzers, but it's still early.

Are you using combined_fields mostly because of the cross_fields scoring bug? We actually just fixed this bug (#89016), maybe that already unblocks you?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
>enhancement :Search/Search Search-related issues that do not fall into other categories Team:Search Meta label for search team
Projects
None yet
Development

No branches or pull requests

5 participants