parent
6665ebe7ab
commit
1fd56698fa
|
@ -108,7 +108,7 @@ final class FetchSearchPhase extends SearchPhase {
|
|||
final List<SearchPhaseResult> phaseResults = queryResults.asList();
|
||||
final String scrollId;
|
||||
if (isScrollSearch) {
|
||||
final boolean includeContextUUID = clusterState.nodes().getMinNodeVersion().onOrAfter(Version.V_8_0_0);
|
||||
final boolean includeContextUUID = clusterState.nodes().getMinNodeVersion().onOrAfter(Version.V_7_7_0);
|
||||
scrollId = TransportSearchHelper.buildScrollId(queryResults, includeContextUUID);
|
||||
} else {
|
||||
scrollId = null;
|
||||
|
|
|
@ -39,7 +39,7 @@ public final class SearchContextId implements Writeable {
|
|||
|
||||
public SearchContextId(StreamInput in) throws IOException {
|
||||
this.id = in.readLong();
|
||||
if (in.getVersion().onOrAfter(Version.V_8_0_0)) {
|
||||
if (in.getVersion().onOrAfter(Version.V_7_7_0)) {
|
||||
this.readerId = in.readString();
|
||||
} else {
|
||||
this.readerId = "";
|
||||
|
@ -49,7 +49,7 @@ public final class SearchContextId implements Writeable {
|
|||
@Override
|
||||
public void writeTo(StreamOutput out) throws IOException {
|
||||
out.writeLong(id);
|
||||
if (out.getVersion().onOrAfter(Version.V_8_0_0)) {
|
||||
if (out.getVersion().onOrAfter(Version.V_7_7_0)) {
|
||||
out.writeString(readerId);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -357,7 +357,7 @@ public class ExceptionSerializationTests extends ESTestCase {
|
|||
Version version = VersionUtils.randomVersion(random());
|
||||
SearchContextMissingException ex = serialize(new SearchContextMissingException(contextId), version);
|
||||
assertThat(ex.contextId().getId(), equalTo(contextId.getId()));
|
||||
if (version.onOrAfter(Version.V_8_0_0)) {
|
||||
if (version.onOrAfter(Version.V_7_7_0)) {
|
||||
assertThat(ex.contextId().getReaderId(), equalTo(contextId.getReaderId()));
|
||||
} else {
|
||||
assertThat(ex.contextId().getReaderId(), equalTo(""));
|
||||
|
|
Loading…
Reference in New Issue