Let's say you have 5 products from same users and u you list them
If a user_id (field) have same value in 5 documents, i want the fifth document to have the least document score
the score should gradually decrease from the first to the fifth
expected score
"hits": [
{
"_type": "product",
"_id": "74162",
"_score": 1,
"_source": {
"user_id": 90
}
},
{
"_type": "product",
"_id": "6",
"_score": 1,
"_source": {
"user_id": 35
}
}
{
"_type": "product",
"_id": "2",
"_score": 0.9,
"_source": {
"user_id": 90
}
},
{
"_type": "product",
"_id": "3",
"_score": 0.8,
"_source": {
"user_id": 90
}
},
{
"_type": "product",
"_id": "4",
"_score": 0.7,
"_source": {
"user_id": 90
}
},
{
"_type": "product",
"_id": "5",
"_score": 0.6,
"_source": {
"user_id": 90
}
}
]