Details
Description
Currently the queryElevation component will elevate specific documents matching the Id provided in input.
This is generally correct as we need to be sure the ID we boost is unique.
This can be potentially problematic when used with the field collapsing.
Specifically after we collapsed on fieldA, the collapsed results will have a unique value on fieldA.
This issue is to allow the flexibility, when necessary to elevate documents based on a different unique field instead of the primary key.
e.g.
In the index we store products by different suppliers.
Each document has:
the unique Id : <id>
the Id of the product : <productId>
After collapsing on productId, productId will become unique and a good candidate for the queryElevation component.
- This issue will implement an additional request parameter for the queryElevation component : idField
The code will then be changed to be parametric.
I will take a look to the code, not sure if it is possible.
User responsibility will be to provide idField which make sense.