diff --git a/core/src/main/java/com/arangodb/entity/arangosearch/analyzer/GeoJSONAnalyzerProperties.java b/core/src/main/java/com/arangodb/entity/arangosearch/analyzer/GeoJSONAnalyzerProperties.java index 9e43c6d3c..2a7cc5594 100644 --- a/core/src/main/java/com/arangodb/entity/arangosearch/analyzer/GeoJSONAnalyzerProperties.java +++ b/core/src/main/java/com/arangodb/entity/arangosearch/analyzer/GeoJSONAnalyzerProperties.java @@ -30,6 +30,7 @@ public final class GeoJSONAnalyzerProperties { private GeoJSONAnalyzerType type; private GeoAnalyzerOptions options; + private Boolean legacy; public GeoJSONAnalyzerType getType() { return type; @@ -51,17 +52,36 @@ public void setOptions(GeoAnalyzerOptions options) { this.options = options; } + /** + * @return This option controls how GeoJSON Polygons are interpreted (introduced in v3.10.5). + * - If `legacy` is `true`, the smaller of the two regions defined by a + * linear ring is interpreted as the interior of the ring and a ring can at most + * enclose half the Earth's surface. + * - If `legacy` is `false`, the area to the left of the boundary ring's + * path is considered to be the interior and a ring can enclose the entire + * surface of the Earth. + *
+ * The default is `false`.
+ */
+ public Boolean getLegacy() {
+ return legacy;
+ }
+
+ public void setLegacy(Boolean legacy) {
+ this.legacy = legacy;
+ }
+
@Override
public boolean equals(Object o) {
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;
GeoJSONAnalyzerProperties that = (GeoJSONAnalyzerProperties) o;
- return type == that.type && Objects.equals(options, that.options);
+ return type == that.type && Objects.equals(options, that.options) && Objects.equals(legacy, that.legacy);
}
@Override
public int hashCode() {
- return Objects.hash(type, options);
+ return Objects.hash(type, options, legacy);
}
public enum GeoJSONAnalyzerType {
diff --git a/test-functional/src/test/java/com/arangodb/ArangoSearchAsyncTest.java b/test-functional/src/test/java/com/arangodb/ArangoSearchAsyncTest.java
index 04bb95d8d..27cf4e31e 100644
--- a/test-functional/src/test/java/com/arangodb/ArangoSearchAsyncTest.java
+++ b/test-functional/src/test/java/com/arangodb/ArangoSearchAsyncTest.java
@@ -861,6 +861,7 @@ void geoJsonAnalyzer(ArangoDatabaseAsync db) throws ExecutionException, Interrup
GeoJSONAnalyzerProperties properties = new GeoJSONAnalyzerProperties();
properties.setOptions(options);
properties.setType(GeoJSONAnalyzerProperties.GeoJSONAnalyzerType.point);
+ properties.setLegacy(true);
Set