HI all,
Please help me out below mentioned problem.
I want to give weightage for every document on the basis of sum of point value in a elasticsearch query.
Suppose i have 3 document and then i want to get sum of all document like sum = 1 + 4 + 2 = 7.
and then i want to give weightage for document 1 is (1/7 * 100) and document 2 is (4/7 * 100) and document 3 is (2/7 * 100).
PUT indexname/_doc/1
{
"doc":"a",
"point":1
}
PUT indexname/_doc/2
{
"doc":"b",
"point":4
}
PUT indexname/_doc/3
{
"doc":"c",
"point":2
}