Fix GeoShapeQueryBuilder serialization after backport
Aligns the routing value serialization version after backport of #30760
This commit is contained in:
parent
94ba78e09a
commit
699153edc7
|
@ -170,7 +170,7 @@ public class GeoShapeQueryBuilder extends AbstractQueryBuilder<GeoShapeQueryBuil
|
||||||
indexedShapeType = in.readOptionalString();
|
indexedShapeType = in.readOptionalString();
|
||||||
indexedShapeIndex = in.readOptionalString();
|
indexedShapeIndex = in.readOptionalString();
|
||||||
indexedShapePath = in.readOptionalString();
|
indexedShapePath = in.readOptionalString();
|
||||||
if (in.getVersion().onOrAfter(Version.V_7_0_0_alpha1)) {
|
if (in.getVersion().onOrAfter(Version.V_6_4_0)) {
|
||||||
indexedShapeRouting = in.readOptionalString();
|
indexedShapeRouting = in.readOptionalString();
|
||||||
} else {
|
} else {
|
||||||
indexedShapeRouting = null;
|
indexedShapeRouting = null;
|
||||||
|
@ -197,7 +197,7 @@ public class GeoShapeQueryBuilder extends AbstractQueryBuilder<GeoShapeQueryBuil
|
||||||
out.writeOptionalString(indexedShapeType);
|
out.writeOptionalString(indexedShapeType);
|
||||||
out.writeOptionalString(indexedShapeIndex);
|
out.writeOptionalString(indexedShapeIndex);
|
||||||
out.writeOptionalString(indexedShapePath);
|
out.writeOptionalString(indexedShapePath);
|
||||||
if (out.getVersion().onOrAfter(Version.V_7_0_0_alpha1)) {
|
if (out.getVersion().onOrAfter(Version.V_6_4_0)) {
|
||||||
out.writeOptionalString(indexedShapeRouting);
|
out.writeOptionalString(indexedShapeRouting);
|
||||||
} else if (indexedShapeRouting != null) {
|
} else if (indexedShapeRouting != null) {
|
||||||
throw new IllegalStateException("indexed shape routing cannot be serialized to older nodes");
|
throw new IllegalStateException("indexed shape routing cannot be serialized to older nodes");
|
||||||
|
|
Loading…
Reference in New Issue