Closed
Description
Multiget doesn't support different routing for each id
public Flux<MultiGetItem> multiGet(Query query, Class clazz, IndexCoordinates index)
-->
private List<MultiGetRequest.Item> getMultiRequestItems(Query searchQuery, Class<?> clazz, IndexCoordinates index)
for (String id : searchQuery.getIds()) {
MultiGetRequest.Item item = new MultiGetRequest.Item(indexName, id);
if (searchQuery.getRoute() != null) {
item = item.routing(searchQuery.getRoute());
}
....
Currently is only possible to set same routing for all ids
GET index-search/_mget
{
"docs": [
{
"_type": "_doc",
"_id": "xxxx",
"routing": "routingForXXXX, routingForYYYY"
},
{
"_type": "_doc",
"_id": "yyyy",
"routing": "routingForXXXX, routingForYYYY"
}
]
}
Should be possible to set different routing for each id
GET index-search/_mget
{
"docs": [
{
"_type": "_doc",
"_id": "xxxx",
"routing": "routingForXXX"
},
{
"_type": "_doc",
"_id": "yyyy",
"routing": "routingForYYYY"
}
]
}