mget doesn't work with aliases. closes #1130.

This commit is contained in:
kimchy 2011-07-19 19:58:25 +03:00
parent d4e18f5f45
commit 8f6de29580
2 changed files with 6 additions and 0 deletions

View File

@ -67,6 +67,11 @@ public class MultiGetRequest implements ActionRequest {
return this.index;
}
public Item index(String index) {
this.index = index;
return this;
}
public String type() {
return this.type;
}

View File

@ -56,6 +56,7 @@ public class TransportMultiGetAction extends BaseAction<MultiGetRequest, MultiGe
Map<ShardId, MultiGetShardRequest> shardRequests = new HashMap<ShardId, MultiGetShardRequest>();
for (int i = 0; i < request.items.size(); i++) {
MultiGetRequest.Item item = request.items.get(i);
item.index(clusterState.metaData().concreteIndex(item.index()));
ShardId shardId = clusterService.operationRouting()
.getShards(clusterState, item.index(), item.type(), item.id(), item.routing(), null).shardId();
MultiGetShardRequest shardRequest = shardRequests.get(shardId);