Skip to content

Commit

Permalink
fix test after removing shape
Browse files Browse the repository at this point in the history
Signed-off-by: MESSAOUDI Khadidja <kmessaoudi@thefork.com>
  • Loading branch information
kmessaoudi committed Mar 18, 2024
1 parent 32c7c68 commit 7095e38
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 52 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ public XyShapeQuery.Builder toBuilder() {
// ---------------------------------------------------------------------------------------------

/**
* Builder for {@link ShapeQuery}.
* Builder for {@link XyShapeQuery}.
*/

public static class Builder extends QueryBase.AbstractBuilder<XyShapeQuery.Builder> implements ObjectBuilder<XyShapeQuery> {
Expand Down Expand Up @@ -140,7 +140,7 @@ protected XyShapeQuery.Builder self() {
}

/**
* Builds a {@link ShapeQuery}.
* Builds a {@link XyShapeQuery}.
*
* @throws NullPointerException
* if some of the required fields are null.
Expand All @@ -155,7 +155,7 @@ public XyShapeQuery build() {
// ---------------------------------------------------------------------------------------------

/**
* Json deserializer for {@link ShapeQuery}
* Json deserializer for {@link XyShapeQuery}
*/
public static final JsonpDeserializer<XyShapeQuery> _DESERIALIZER = ObjectBuilderDeserializer.lazy(
XyShapeQuery.Builder::new,
Expand Down

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@
import org.opensearch.client.opensearch._types.ErrorCause;
import org.opensearch.client.opensearch._types.FieldValue;
import org.opensearch.client.opensearch._types.GeoLocation;
import org.opensearch.client.opensearch._types.GeoShapeRelation;
import org.opensearch.client.opensearch._types.SortOptions;
import org.opensearch.client.opensearch._types.SortOptionsBuilders;
import org.opensearch.client.opensearch._types.SortOrder;
Expand All @@ -59,22 +58,6 @@ public void testSingleKeyDictionary() {
assertEquals("some-value", q.value().stringValue());
}

@Test
public void testAdditionalPropertyOnClass() {
ShapeQuery q = new ShapeQuery.Builder().queryName("query-name")
.field("field-name")
.shape(_0 -> _0.relation(GeoShapeRelation.Disjoint))
.ignoreUnmapped(true)
.build();

q = checkJsonRoundtrip(q, "{\"field-name\":{\"relation\":\"disjoint\"},\"_name\":\"query-name\",\"ignore_unmapped\":true}");

assertEquals("query-name", q.queryName());
assertTrue(q.ignoreUnmapped());
assertEquals(GeoShapeRelation.Disjoint, q.shape().relation());
System.out.println(toJson(q));
}

@Test
public void testWrapperQuery() {
WrapperQuery q = new WrapperQuery.Builder().query("encoded_query").build();
Expand Down

0 comments on commit 7095e38

Please sign in to comment.