Skip to content

Instantly share code, notes, and snippets.

@Pyppe
Created April 8, 2016 07:27
Show Gist options
  • Save Pyppe/39d75137559dd1495c686cb0f6811878 to your computer and use it in GitHub Desktop.
Save Pyppe/39d75137559dd1495c686cb0f6811878 to your computer and use it in GitHub Desktop.
Boosting a field yields bizarre results Elasticsearch
{
"matched": true,
"explanation": {
"value": 2.1227224,
"description": "sum of:",
"details": [
{
"value": 2.1227224,
"description": "product of:",
"details": [
{
"value": 7.429528,
"description": "sum of:",
"details": [
{
"value": 4.4247117,
"description": "weight(name:foobar in 1721263) [PerFieldSimilarity], result of:",
"details": [
{
"value": 4.4247117,
"description": "score(doc=1721263,freq=1.0), product of:",
"details": [
{
"value": 0.36579937,
"description": "queryWeight, product of:",
"details": [
{
"value": 12.096007,
"description": "idf(docFreq=1163, maxDocs=76716294)",
"details": []
},
{
"value": 0.030241331,
"description": "queryNorm",
"details": []
}
]
},
{
"value": 12.096007,
"description": "fieldWeight in 1721263, product of:",
"details": [
{
"value": 1,
"description": "tf(freq=1.0), with freq of:",
"details": [
{
"value": 1,
"description": "termFreq=1.0",
"details": []
}
]
},
{
"value": 12.096007,
"description": "idf(docFreq=1163, maxDocs=76716294)",
"details": []
},
{
"value": 1,
"description": "fieldNorm(doc=1721263)",
"details": []
}
]
}
]
}
]
},
{
"value": 3.0048163,
"description": "weight(status:Pending in 1721263) [PerFieldSimilarity], result of:",
"details": [
{
"value": 3.0048163,
"description": "score(doc=1721263,freq=1.0), product of:",
"details": [
{
"value": 0.60289186,
"description": "queryWeight, product of:",
"details": [
{
"value": 4,
"description": "boost",
"details": []
},
{
"value": 4.9840055,
"description": "idf(docFreq=1427762, maxDocs=76716294)",
"details": []
},
{
"value": 0.030241331,
"description": "queryNorm",
"details": []
}
]
},
{
"value": 4.9840055,
"description": "fieldWeight in 1721263, product of:",
"details": [
{
"value": 1,
"description": "tf(freq=1.0), with freq of:",
"details": [
{
"value": 1,
"description": "termFreq=1.0",
"details": []
}
]
},
{
"value": 4.9840055,
"description": "idf(docFreq=1427762, maxDocs=76716294)",
"details": []
},
{
"value": 1,
"description": "fieldNorm(doc=1721263)",
"details": []
}
]
}
]
}
]
}
]
},
{
"value": 0.2857143,
"description": "coord(2/7)",
"details": []
}
]
},
{
"value": 0,
"description": "match on required clause, product of:",
"details": [
{
"value": 0,
"description": "# clause",
"details": []
},
{
"value": 0.030241331,
"description": "_type:mark, product of:",
"details": [
{
"value": 1,
"description": "boost",
"details": []
},
{
"value": 0.030241331,
"description": "queryNorm",
"details": []
}
]
}
]
}
]
}
}
{
"matched": true,
"explanation": {
"value": 1.4841961,
"description": "sum of:",
"details": [
{
"value": 1.4841961,
"description": "product of:",
"details": [
{
"value": 5.194686,
"description": "sum of:",
"details": [
{
"value": 4.4247117,
"description": "weight(name:foobar in 3644379) [PerFieldSimilarity], result of:",
"details": [
{
"value": 4.4247117,
"description": "score(doc=3644379,freq=1.0), product of:",
"details": [
{
"value": 0.36579937,
"description": "queryWeight, product of:",
"details": [
{
"value": 12.096007,
"description": "idf(docFreq=1163, maxDocs=76716294)",
"details": []
},
{
"value": 0.030241331,
"description": "queryNorm",
"details": []
}
]
},
{
"value": 12.096007,
"description": "fieldWeight in 3644379, product of:",
"details": [
{
"value": 1,
"description": "tf(freq=1.0), with freq of:",
"details": [
{
"value": 1,
"description": "termFreq=1.0",
"details": []
}
]
},
{
"value": 12.096007,
"description": "idf(docFreq=1163, maxDocs=76716294)",
"details": []
},
{
"value": 1,
"description": "fieldNorm(doc=3644379)",
"details": []
}
]
}
]
}
]
},
{
"value": 0.76997423,
"description": "weight(status:Valid in 3644379) [PerFieldSimilarity], result of:",
"details": [
{
"value": 0.76997423,
"description": "score(doc=3644379,freq=1.0), product of:",
"details": [
{
"value": 0.37377837,
"description": "queryWeight, product of:",
"details": [
{
"value": 6,
"description": "boost",
"details": []
},
{
"value": 2.0599754,
"description": "idf(docFreq=26579457, maxDocs=76716294)",
"details": []
},
{
"value": 0.030241331,
"description": "queryNorm",
"details": []
}
]
},
{
"value": 2.0599754,
"description": "fieldWeight in 3644379, product of:",
"details": [
{
"value": 1,
"description": "tf(freq=1.0), with freq of:",
"details": [
{
"value": 1,
"description": "termFreq=1.0",
"details": []
}
]
},
{
"value": 2.0599754,
"description": "idf(docFreq=26579457, maxDocs=76716294)",
"details": []
},
{
"value": 1,
"description": "fieldNorm(doc=3644379)",
"details": []
}
]
}
]
}
]
}
]
},
{
"value": 0.2857143,
"description": "coord(2/7)",
"details": []
}
]
},
{
"value": 0,
"description": "match on required clause, product of:",
"details": [
{
"value": 0,
"description": "# clause",
"details": []
},
{
"value": 0.030241331,
"description": "_type:mark, product of:",
"details": [
{
"value": 1,
"description": "boost",
"details": []
},
{
"value": 0.030241331,
"description": "queryNorm",
"details": []
}
]
}
]
}
]
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment