Skip to content

Commit

Permalink
remove shape property
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 4b8b250 commit 32c7c68
Show file tree
Hide file tree
Showing 11 changed files with 3 additions and 730 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ This section is for maintaining a changelog for all breaking changes for the cli
- Deprecate RestClientTransport ([#536](https://github.com/opensearch-project/opensearch-java/pull/536))

### Removed
- Delete shape property ([#884](https://github.com/opensearch-project/opensearch-java/pull/885))

### Fixed
- Fix version and build ([#254](https://github.com/opensearch-project/opensearch-java/pull/254))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -109,8 +109,6 @@ public enum FieldType implements JsonEnum {

FlatObject("flat_object"),

Shape("shape"),

XyShape("xy_shape"),

Histogram("histogram"),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -136,8 +136,6 @@ public enum Kind implements JsonEnum {

SearchAsYouType("search_as_you_type"),

Shape("shape"),

XyShape("xy_shape"),

Short("short"),
Expand Down Expand Up @@ -846,23 +844,6 @@ public SearchAsYouTypeProperty searchAsYouType() {
return TaggedUnionUtils.get(this, Kind.SearchAsYouType);
}

/**
* Is this variant instance of kind {@code shape}?
*/
public boolean isShape() {
return _kind == Kind.Shape;
}

/**
* Get the {@code shape} variant value.
*
* @throws IllegalStateException
* if the current variant is not of the {@code shape} kind.
*/
public ShapeProperty shape() {
return TaggedUnionUtils.get(this, Kind.Shape);
}

/**
* Is this variant instance of kind {@code xy_shape}?
*/
Expand All @@ -874,7 +855,7 @@ public boolean isXyShape() {
* Get the {@code xy_shape} variant value.
*
* @throws IllegalStateException
* if the current variant is not of the {@code shape} kind.
* if the current variant is not of the {@code xy_shape} kind.
*/
public XyShapeProperty xyShape() {
return TaggedUnionUtils.get(this, Kind.XyShape);
Expand Down Expand Up @@ -1383,15 +1364,6 @@ public ObjectBuilder<Property> searchAsYouType(
return this.searchAsYouType(fn.apply(new SearchAsYouTypeProperty.Builder()).build());
}

public ObjectBuilder<Property> shape(ShapeProperty v) {
this._kind = Kind.Shape;
this._value = v;
return this;
}

public ObjectBuilder<Property> shape(Function<ShapeProperty.Builder, ObjectBuilder<ShapeProperty>> fn) {
return this.shape(fn.apply(new ShapeProperty.Builder()).build());
}

public ObjectBuilder<Property> xyShape(XyShapeProperty v) {
this._kind = Kind.XyShape;
Expand Down Expand Up @@ -1512,7 +1484,6 @@ protected static void setupPropertyDeserializer(ObjectDeserializer<Builder> op)
op.add(Builder::rankFeatures, RankFeaturesProperty._DESERIALIZER, "rank_features");
op.add(Builder::scaledFloat, ScaledFloatNumberProperty._DESERIALIZER, "scaled_float");
op.add(Builder::searchAsYouType, SearchAsYouTypeProperty._DESERIALIZER, "search_as_you_type");
op.add(Builder::shape, ShapeProperty._DESERIALIZER, "shape");
op.add(Builder::xyShape, XyShapeProperty._DESERIALIZER, "xy_shape");
op.add(Builder::short_, ShortNumberProperty._DESERIALIZER, "short");
op.add(Builder::text, TextProperty._DESERIALIZER, "text");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -331,14 +331,6 @@ public static SearchAsYouTypeProperty.Builder searchAsYouType() {
return new SearchAsYouTypeProperty.Builder();
}

/**
* Creates a builder for the {@link ShapeProperty shape} {@code Property}
* variant.
*/
public static ShapeProperty.Builder shape() {
return new ShapeProperty.Builder();
}

/**
* Creates a builder for the {@link XyShapeProperty xy_shape} {@code Property}
* variant.
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -142,8 +142,6 @@ public enum Kind implements JsonEnum {

ScriptScore("script_score"),

Shape("shape"),

XyShape("xy_shape"),

SimpleQueryString("simple_query_string"),
Expand Down Expand Up @@ -916,23 +914,6 @@ public ScriptScoreQuery scriptScore() {
return TaggedUnionUtils.get(this, Kind.ScriptScore);
}

/**
* Is this variant instance of kind {@code shape}?
*/
public boolean isShape() {
return _kind == Kind.Shape;
}

/**
* Get the {@code shape} variant value.
*
* @throws IllegalStateException
* if the current variant is not of the {@code shape} kind.
*/
public ShapeQuery shape() {
return TaggedUnionUtils.get(this, Kind.Shape);
}

/**
* Is this variant instance of kind {@code xy_shape}?
*/
Expand Down Expand Up @@ -1658,16 +1639,6 @@ public ObjectBuilder<Query> scriptScore(Function<ScriptScoreQuery.Builder, Objec
return this.scriptScore(fn.apply(new ScriptScoreQuery.Builder()).build());
}

public ObjectBuilder<Query> shape(ShapeQuery v) {
this._kind = Kind.Shape;
this._value = v;
return this;
}

public ObjectBuilder<Query> shape(Function<ShapeQuery.Builder, ObjectBuilder<ShapeQuery>> fn) {
return this.shape(fn.apply(new ShapeQuery.Builder()).build());
}

public ObjectBuilder<Query> simpleQueryString(SimpleQueryStringQuery v) {
this._kind = Kind.SimpleQueryString;
this._value = v;
Expand Down Expand Up @@ -1877,7 +1848,6 @@ protected static void setupQueryDeserializer(ObjectDeserializer<Builder> op) {
op.add(Builder::regexp, RegexpQuery._DESERIALIZER, "regexp");
op.add(Builder::script, ScriptQuery._DESERIALIZER, "script");
op.add(Builder::scriptScore, ScriptScoreQuery._DESERIALIZER, "script_score");
op.add(Builder::shape, ShapeQuery._DESERIALIZER, "shape");
op.add(Builder::simpleQueryString, SimpleQueryStringQuery._DESERIALIZER, "simple_query_string");
op.add(Builder::spanContaining, SpanContainingQuery._DESERIALIZER, "span_containing");
op.add(Builder::fieldMaskingSpan, SpanFieldMaskingQuery._DESERIALIZER, "field_masking_span");
Expand Down
Loading

0 comments on commit 32c7c68

Please sign in to comment.