create shard count request with the actual count request
This commit is contained in:
parent
b0dd31e600
commit
7ba1ad2d7b
|
@ -43,13 +43,12 @@ class ShardCountRequest extends BroadcastShardOperationRequest {
|
|||
|
||||
}
|
||||
|
||||
public ShardCountRequest(String index, int shardId, byte[] querySource, float minScore,
|
||||
@Nullable String queryParserName, String... types) {
|
||||
public ShardCountRequest(String index, int shardId, CountRequest request) {
|
||||
super(index, shardId);
|
||||
this.minScore = minScore;
|
||||
this.querySource = querySource;
|
||||
this.queryParserName = queryParserName;
|
||||
this.types = types;
|
||||
this.minScore = request.minScore();
|
||||
this.querySource = request.querySource();
|
||||
this.queryParserName = request.queryParserName();
|
||||
this.types = request.types();
|
||||
}
|
||||
|
||||
public float minScore() {
|
||||
|
|
|
@ -67,7 +67,7 @@ public class TransportCountAction extends TransportBroadcastOperationAction<Coun
|
|||
}
|
||||
|
||||
@Override protected ShardCountRequest newShardRequest(ShardRouting shard, CountRequest request) {
|
||||
return new ShardCountRequest(shard.index(), shard.id(), request.querySource(), request.minScore(), request.queryParserName(), request.types());
|
||||
return new ShardCountRequest(shard.index(), shard.id(), request);
|
||||
}
|
||||
|
||||
@Override protected ShardCountResponse newShardResponse() {
|
||||
|
|
Loading…
Reference in New Issue