Use IDF from _all field across other fields


(Nige) #1

It seems that IDF is computed per token per field. We would like it to be computed just per token so that the same IDF will be used in each field of the document to compute the final score. The _all field already has this ideal IDF that we would like to apply to all fields. How can this be achieved with ElasticSearch using the MultiMatch query?

Many thanks,
Nige


(Doug Turnbull) #2

You might want to check out cross_field search. It blends doc freq across
fields with identical analyzers
https://www.elastic.co/guide/en/elasticsearch/guide/current/_cross_fields_queries.html

I've also written about it a lot



(Gihan Karunaratne) #3

Many thanks for the reply and the links to cross_field query articles.

We want to query 3 fields and find the single best-matching field but use the same IDF across all 3 fields when calculating the score from the best-matching field. Will multi-match with cross_field achieve this objective?

We would also like exact matches to rank higher.


(system) #4