parent
05ef60135b
commit
752ba2fb45
|
@ -235,7 +235,7 @@ public class ShardSearchLocalRequest implements ShardSearchRequest {
|
|||
if (in.getVersion().onOrAfter(Version.V_6_3_0)) {
|
||||
allowPartialSearchResults = in.readOptionalBoolean();
|
||||
}
|
||||
if (in.getVersion().onOrAfter(Version.V_7_0_0_alpha1)) {
|
||||
if (in.getVersion().onOrAfter(Version.V_6_4_0)) {
|
||||
indexRoutings = in.readStringArray();
|
||||
preference = in.readOptionalString();
|
||||
} else {
|
||||
|
@ -268,7 +268,7 @@ public class ShardSearchLocalRequest implements ShardSearchRequest {
|
|||
out.writeOptionalBoolean(allowPartialSearchResults);
|
||||
}
|
||||
if (asKey == false) {
|
||||
if (out.getVersion().onOrAfter(Version.V_7_0_0_alpha1)) {
|
||||
if (out.getVersion().onOrAfter(Version.V_6_4_0)) {
|
||||
out.writeStringArray(indexRoutings);
|
||||
out.writeOptionalString(preference);
|
||||
}
|
||||
|
|
|
@ -225,7 +225,7 @@ public class SliceBuilder implements Writeable, ToXContentObject {
|
|||
|
||||
int shardId = request.shardId().id();
|
||||
int numShards = context.getIndexSettings().getNumberOfShards();
|
||||
if (minNodeVersion.onOrAfter(Version.V_7_0_0_alpha1) &&
|
||||
if (minNodeVersion.onOrAfter(Version.V_6_4_0) &&
|
||||
(request.preference() != null || request.indexRoutings().length > 0)) {
|
||||
GroupShardsIterator<ShardIterator> group = buildShardIterator(clusterService, request);
|
||||
assert group.size() <= numShards : "index routing shards: " + group.size() +
|
||||
|
@ -235,7 +235,7 @@ public class SliceBuilder implements Writeable, ToXContentObject {
|
|||
* The routing of this request targets a subset of the shards of this index so we need to we retrieve
|
||||
* the original {@link GroupShardsIterator} and compute the request shard id and number of
|
||||
* shards from it.
|
||||
* This behavior has been added in {@link Version#V_7_0_0_alpha1} so if there is another node in the cluster
|
||||
* This behavior has been added in {@link Version#V_6_4_0} so if there is another node in the cluster
|
||||
* with an older version we use the original shard id and number of shards in order to ensure that all
|
||||
* slices use the same numbers.
|
||||
*/
|
||||
|
|
Loading…
Reference in New Issue