Skip to content

Commit

Permalink
Remove terms_enum
Browse files Browse the repository at this point in the history
Signed-off-by: Thomas Farr <[email protected]>
  • Loading branch information
Xtansia committed Jan 9, 2025
1 parent 7f6a771 commit dfe4249
Show file tree
Hide file tree
Showing 5 changed files with 1 addition and 743 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ This section is for maintaining a changelog for all breaking changes for the cli
- Removed the `indices.diskUsage` operation as it's not supported by OpenSearch ([#1361](https://github.com/opensearch-project/opensearch-java/pull/1361))
- Removed the `ingest.geoIpStats` operation as it's not supported by OpenSearch ([#1375](https://github.com/opensearch-project/opensearch-java/pull/1375))
- Removed the `indices.getUpgrade` and `indices.upgrade` operations as they're not supported by OpenSearch ([#]())
- Removed the `termsEnum` operation as it's not supported by OpenSearch ([#]())

### 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 @@ -64,8 +64,6 @@
import org.opensearch.client.opensearch.core.SearchResponse;
import org.opensearch.client.opensearch.core.SearchTemplateRequest;
import org.opensearch.client.opensearch.core.SearchTemplateResponse;
import org.opensearch.client.opensearch.core.TermsEnumRequest;
import org.opensearch.client.opensearch.core.TermsEnumResponse;
import org.opensearch.client.opensearch.core.TermvectorsRequest;
import org.opensearch.client.opensearch.core.TermvectorsResponse;
import org.opensearch.client.opensearch.core.UpdateRequest;
Expand Down Expand Up @@ -614,42 +612,6 @@ public final <TDocument> CompletableFuture<SearchTemplateResponse<TDocument>> se
return searchTemplate(fn.apply(new SearchTemplateRequest.Builder()).build(), tDocumentClass);
}

// ----- Endpoint: terms_enum

/**
* The terms enum API can be used to discover terms in the index that begin with
* the provided string. It is designed for low-latency look-ups used in
* auto-complete scenarios.
*
*
*/

public CompletableFuture<TermsEnumResponse> termsEnum(TermsEnumRequest request) throws IOException, OpenSearchException {
@SuppressWarnings("unchecked")
JsonEndpoint<TermsEnumRequest, TermsEnumResponse, ErrorResponse> endpoint = (JsonEndpoint<
TermsEnumRequest,
TermsEnumResponse,
ErrorResponse>) TermsEnumRequest._ENDPOINT;

return this.transport.performRequestAsync(request, endpoint, this.transportOptions);
}

/**
* The terms enum API can be used to discover terms in the index that begin with
* the provided string. It is designed for low-latency look-ups used in
* auto-complete scenarios.
*
* @param fn
* a function that initializes a builder to create the
* {@link TermsEnumRequest}
*
*/

public final CompletableFuture<TermsEnumResponse> termsEnum(Function<TermsEnumRequest.Builder, ObjectBuilder<TermsEnumRequest>> fn)
throws IOException, OpenSearchException {
return termsEnum(fn.apply(new TermsEnumRequest.Builder()).build());
}

// ----- Endpoint: termvectors

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,6 @@
import org.opensearch.client.opensearch.core.SearchResponse;
import org.opensearch.client.opensearch.core.SearchTemplateRequest;
import org.opensearch.client.opensearch.core.SearchTemplateResponse;
import org.opensearch.client.opensearch.core.TermsEnumRequest;
import org.opensearch.client.opensearch.core.TermsEnumResponse;
import org.opensearch.client.opensearch.core.TermvectorsRequest;
import org.opensearch.client.opensearch.core.TermvectorsResponse;
import org.opensearch.client.opensearch.core.UpdateRequest;
Expand Down Expand Up @@ -611,42 +609,6 @@ public final <TDocument> SearchTemplateResponse<TDocument> searchTemplate(
return searchTemplate(fn.apply(new SearchTemplateRequest.Builder()).build(), tDocumentClass);
}

// ----- Endpoint: terms_enum

/**
* The terms enum API can be used to discover terms in the index that begin with
* the provided string. It is designed for low-latency look-ups used in
* auto-complete scenarios.
*
*
*/

public TermsEnumResponse termsEnum(TermsEnumRequest request) throws IOException, OpenSearchException {
@SuppressWarnings("unchecked")
JsonEndpoint<TermsEnumRequest, TermsEnumResponse, ErrorResponse> endpoint = (JsonEndpoint<
TermsEnumRequest,
TermsEnumResponse,
ErrorResponse>) TermsEnumRequest._ENDPOINT;

return this.transport.performRequest(request, endpoint, this.transportOptions);
}

/**
* The terms enum API can be used to discover terms in the index that begin with
* the provided string. It is designed for low-latency look-ups used in
* auto-complete scenarios.
*
* @param fn
* a function that initializes a builder to create the
* {@link TermsEnumRequest}
*
*/

public final TermsEnumResponse termsEnum(Function<TermsEnumRequest.Builder, ObjectBuilder<TermsEnumRequest>> fn) throws IOException,
OpenSearchException {
return termsEnum(fn.apply(new TermsEnumRequest.Builder()).build());
}

// ----- Endpoint: termvectors

/**
Expand Down
Loading

0 comments on commit dfe4249

Please sign in to comment.