Revert "Temporarily set bwc version for new nested sorting to 7.0.0-alpha1 until the change has been backported to 6.x branch."
This reverts commit 472a5dd56b
.
This commit is contained in:
parent
472a5dd56b
commit
410c6c281a
|
@ -19,6 +19,8 @@
|
||||||
|
|
||||||
package org.elasticsearch.search.sort;
|
package org.elasticsearch.search.sort;
|
||||||
|
|
||||||
|
import static org.elasticsearch.search.sort.NestedSortBuilder.NESTED_FIELD;
|
||||||
|
|
||||||
import org.apache.lucene.search.SortField;
|
import org.apache.lucene.search.SortField;
|
||||||
import org.elasticsearch.Version;
|
import org.elasticsearch.Version;
|
||||||
import org.elasticsearch.common.ParseField;
|
import org.elasticsearch.common.ParseField;
|
||||||
|
@ -44,8 +46,6 @@ import org.elasticsearch.search.MultiValueMode;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
|
|
||||||
import static org.elasticsearch.search.sort.NestedSortBuilder.NESTED_FIELD;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A sort builder to sort based on a document field.
|
* A sort builder to sort based on a document field.
|
||||||
*/
|
*/
|
||||||
|
@ -118,7 +118,7 @@ public class FieldSortBuilder extends SortBuilder<FieldSortBuilder> {
|
||||||
order = in.readOptionalWriteable(SortOrder::readFromStream);
|
order = in.readOptionalWriteable(SortOrder::readFromStream);
|
||||||
sortMode = in.readOptionalWriteable(SortMode::readFromStream);
|
sortMode = in.readOptionalWriteable(SortMode::readFromStream);
|
||||||
unmappedType = in.readOptionalString();
|
unmappedType = in.readOptionalString();
|
||||||
if (in.getVersion().onOrAfter(Version.V_7_0_0_alpha1)) {
|
if (in.getVersion().onOrAfter(Version.V_6_1_0)) {
|
||||||
nestedSort = in.readOptionalWriteable(NestedSortBuilder::new);
|
nestedSort = in.readOptionalWriteable(NestedSortBuilder::new);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -132,7 +132,7 @@ public class FieldSortBuilder extends SortBuilder<FieldSortBuilder> {
|
||||||
out.writeOptionalWriteable(order);
|
out.writeOptionalWriteable(order);
|
||||||
out.writeOptionalWriteable(sortMode);
|
out.writeOptionalWriteable(sortMode);
|
||||||
out.writeOptionalString(unmappedType);
|
out.writeOptionalString(unmappedType);
|
||||||
if (out.getVersion().onOrAfter(Version.V_7_0_0_alpha1)) {
|
if (out.getVersion().onOrAfter(Version.V_6_1_0)) {
|
||||||
out.writeOptionalWriteable(nestedSort);
|
out.writeOptionalWriteable(nestedSort);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -166,7 +166,7 @@ public class GeoDistanceSortBuilder extends SortBuilder<GeoDistanceSortBuilder>
|
||||||
sortMode = in.readOptionalWriteable(SortMode::readFromStream);
|
sortMode = in.readOptionalWriteable(SortMode::readFromStream);
|
||||||
nestedFilter = in.readOptionalNamedWriteable(QueryBuilder.class);
|
nestedFilter = in.readOptionalNamedWriteable(QueryBuilder.class);
|
||||||
nestedPath = in.readOptionalString();
|
nestedPath = in.readOptionalString();
|
||||||
if (in.getVersion().onOrAfter(Version.V_7_0_0_alpha1)) {
|
if (in.getVersion().onOrAfter(Version.V_6_1_0)) {
|
||||||
nestedSort = in.readOptionalWriteable(NestedSortBuilder::new);
|
nestedSort = in.readOptionalWriteable(NestedSortBuilder::new);
|
||||||
}
|
}
|
||||||
validation = GeoValidationMethod.readFromStream(in);
|
validation = GeoValidationMethod.readFromStream(in);
|
||||||
|
@ -182,7 +182,7 @@ public class GeoDistanceSortBuilder extends SortBuilder<GeoDistanceSortBuilder>
|
||||||
out.writeOptionalWriteable(sortMode);
|
out.writeOptionalWriteable(sortMode);
|
||||||
out.writeOptionalNamedWriteable(nestedFilter);
|
out.writeOptionalNamedWriteable(nestedFilter);
|
||||||
out.writeOptionalString(nestedPath);
|
out.writeOptionalString(nestedPath);
|
||||||
if (out.getVersion().onOrAfter(Version.V_7_0_0_alpha1)) {
|
if (out.getVersion().onOrAfter(Version.V_6_1_0)) {
|
||||||
out.writeOptionalWriteable(nestedSort);
|
out.writeOptionalWriteable(nestedSort);
|
||||||
}
|
}
|
||||||
validation.writeTo(out);
|
validation.writeTo(out);
|
||||||
|
|
|
@ -120,7 +120,7 @@ public class ScriptSortBuilder extends SortBuilder<ScriptSortBuilder> {
|
||||||
sortMode = in.readOptionalWriteable(SortMode::readFromStream);
|
sortMode = in.readOptionalWriteable(SortMode::readFromStream);
|
||||||
nestedPath = in.readOptionalString();
|
nestedPath = in.readOptionalString();
|
||||||
nestedFilter = in.readOptionalNamedWriteable(QueryBuilder.class);
|
nestedFilter = in.readOptionalNamedWriteable(QueryBuilder.class);
|
||||||
if (in.getVersion().onOrAfter(Version.V_7_0_0_alpha1)) {
|
if (in.getVersion().onOrAfter(Version.V_6_1_0)) {
|
||||||
nestedSort = in.readOptionalWriteable(NestedSortBuilder::new);
|
nestedSort = in.readOptionalWriteable(NestedSortBuilder::new);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -133,7 +133,7 @@ public class ScriptSortBuilder extends SortBuilder<ScriptSortBuilder> {
|
||||||
out.writeOptionalWriteable(sortMode);
|
out.writeOptionalWriteable(sortMode);
|
||||||
out.writeOptionalString(nestedPath);
|
out.writeOptionalString(nestedPath);
|
||||||
out.writeOptionalNamedWriteable(nestedFilter);
|
out.writeOptionalNamedWriteable(nestedFilter);
|
||||||
if (out.getVersion().onOrAfter(Version.V_7_0_0_alpha1)) {
|
if (out.getVersion().onOrAfter(Version.V_6_1_0)) {
|
||||||
out.writeOptionalWriteable(nestedSort);
|
out.writeOptionalWriteable(nestedSort);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue