In function_score queries it is possible to adjust the behavior via the score_mode (max, sum, multiply etc.) Is a similiar configuration possible for other queries?
Example:
We have a index definition with default-fields like this:
Doing a simple query_string-query we got results, where the _score is calculated from the "max score of" all fields that matches (--> max_score of (ABSTRACT, AUTOR and BRANCHE)..). We don't need the max-score of all searched field; instead we want to multiply scores of all machted fields?
Can this be specified at query-time? Didn't found a configuration for this?
I might be totally misreading this, but aren't the types of a multi match what you are looking for? Specifically most_fields (which is only adding and not multiplying, but it's at least the right direction) instead of best_fields?
Kind of. I'm searching such types for the Query String Query (not a multi match query).
The String-Query searches per default in the "default_field"s from the index definition (see above). The score of matches in those fields should be calculated as "most_fields".
Is there any configuration option which I missed?
From what I know this isn't possible with the query_string and that's why I used multi_match. Generally query_string offers a lot of options and is a good starting point, but for finer control it might IMO not be the right choice.
Thanks @xeraa for helping out. In our use-case we need the full featured query-syntax from the Query String Query. It's a user specific search that uses those operations. Sure, we can rebuild our own String-Query and map it into a very complex Json structure using mulit_match, bool queries and so on. But that seems to make no sense if we just want to change the behavior of scoring over the different fields....
Is there any plan (ticket) to config scoring-behavior for a string-query?
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.