I have this JSON object where I wish to change the scoring function of the
search query:
POST /index/document/_search
{
"query": {
"function_score": {
"query": {"match": {"_all": "fox"}},
"script_score": {
"script": "_score"
}
}
}
}
I want to change the score function so that it multiplies the TF and IDF of
the term "fox". I ran a search query with "_explain" set to true and in the
explanantion part I got this:
"_explanation": {
"value": 1.110572,
"description": "weight(text:fox in 76) [PerFieldSimilarity], result of:",
"details": [
{
"value": 1.110572,
"description": "fieldWeight in 76, product of:",
"details": [
{
"value": 1,
"description": "tf(freq=1.0), with freq of:",
"details": [
{
"value": 1,
"description": "termFreq=1.0"
}
]
},
{
"value": 4.442288,
"description": "idf(docFreq=123, maxDocs=3453)"
},
{
"value": 0.25,
"description": "fieldNorm(doc=76)"
}
]
}
]
}
How can use the values of IDF and TF to change the actual score of the
document?
--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/6bb5b692-da40-4e2a-9221-40ccad5c5f6f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.