Skip to content

Commit

Permalink
Adapt version after backport
Browse files Browse the repository at this point in the history
Relates #51708
  • Loading branch information
jimczi committed Feb 6, 2020
1 parent 87ee44d commit b471532
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ public ShardSearchRequest(StreamInput in) throws IOException {
numberOfShards = in.readVInt();
scroll = in.readOptionalWriteable(Scroll::new);
source = in.readOptionalWriteable(SearchSourceBuilder::new);
if (in.getVersion().before(Version.V_8_0_0)) {
if (in.getVersion().before(Version.V_7_7_0)) {
// types no longer relevant so ignore
String[] types = in.readStringArray();
if (types.length > 0) {
Expand All @@ -170,7 +170,7 @@ public ShardSearchRequest(StreamInput in) throws IOException {
allowPartialSearchResults = in.readBoolean();
indexRoutings = in.readStringArray();
preference = in.readOptionalString();
if (in.getVersion().onOrAfter(Version.V_8_0_0)) {
if (in.getVersion().onOrAfter(Version.V_7_7_0)) {
canReturnNullResponseIfMatchNoDocs = in.readBoolean();
} else {
canReturnNullResponseIfMatchNoDocs = false;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ public QuerySearchResult() {

public QuerySearchResult(StreamInput in) throws IOException {
super(in);
if (in.getVersion().onOrAfter(Version.V_8_0_0)) {
if (in.getVersion().onOrAfter(Version.V_7_7_0)) {
isNull = in.readBoolean();
} else {
isNull = false;
Expand Down Expand Up @@ -342,7 +342,7 @@ public void readFromWithId(long id, StreamInput in) throws IOException {

@Override
public void writeTo(StreamOutput out) throws IOException {
if (out.getVersion().onOrAfter(Version.V_8_0_0)) {
if (out.getVersion().onOrAfter(Version.V_7_7_0)) {
out.writeBoolean(isNull);
}
if (isNull == false) {
Expand Down

0 comments on commit b471532

Please sign in to comment.