Skip to content

Commit a4f6d1b

Browse files
committed
remove deprecated endpoint
1 parent 0652515 commit a4f6d1b

File tree

6 files changed

+0
-1530
lines changed

6 files changed

+0
-1530
lines changed

java-client/src/main/java/co/elastic/clients/elasticsearch/ElasticsearchAsyncClient.java

Lines changed: 0 additions & 107 deletions
Original file line numberDiff line numberDiff line change
@@ -67,8 +67,6 @@
6767
import co.elastic.clients.elasticsearch.core.IndexResponse;
6868
import co.elastic.clients.elasticsearch.core.InfoRequest;
6969
import co.elastic.clients.elasticsearch.core.InfoResponse;
70-
import co.elastic.clients.elasticsearch.core.KnnSearchRequest;
71-
import co.elastic.clients.elasticsearch.core.KnnSearchResponse;
7270
import co.elastic.clients.elasticsearch.core.MgetRequest;
7371
import co.elastic.clients.elasticsearch.core.MgetResponse;
7472
import co.elastic.clients.elasticsearch.core.MsearchRequest;
@@ -3335,111 +3333,6 @@ public CompletableFuture<InfoResponse> info() {
33353333
return this.transport.performRequestAsync(InfoRequest._INSTANCE, InfoRequest._ENDPOINT, this.transportOptions);
33363334
}
33373335

3338-
// ----- Endpoint: knn_search
3339-
3340-
/**
3341-
* Run a knn search.
3342-
* <p>
3343-
* NOTE: The kNN search API has been replaced by the <code>knn</code> option in
3344-
* the search API.
3345-
*
3346-
* @see <a href=
3347-
* "https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-knn-search">Documentation
3348-
* on elastic.co</a>
3349-
*/
3350-
3351-
public <TDocument> CompletableFuture<KnnSearchResponse<TDocument>> knnSearch(KnnSearchRequest request,
3352-
Class<TDocument> tDocumentClass) {
3353-
@SuppressWarnings("unchecked")
3354-
JsonEndpoint<KnnSearchRequest, KnnSearchResponse<TDocument>, ErrorResponse> endpoint = (JsonEndpoint<KnnSearchRequest, KnnSearchResponse<TDocument>, ErrorResponse>) KnnSearchRequest._ENDPOINT;
3355-
endpoint = new EndpointWithResponseMapperAttr<>(endpoint,
3356-
"co.elastic.clients:Deserializer:_global.knn_search.Response.TDocument",
3357-
getDeserializer(tDocumentClass));
3358-
3359-
return this.transport.performRequestAsync(request, endpoint, this.transportOptions);
3360-
}
3361-
3362-
/**
3363-
* Run a knn search.
3364-
* <p>
3365-
* NOTE: The kNN search API has been replaced by the <code>knn</code> option in
3366-
* the search API.
3367-
*
3368-
* @param fn
3369-
* a function that initializes a builder to create the
3370-
* {@link KnnSearchRequest}
3371-
* @see <a href=
3372-
* "https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-knn-search">Documentation
3373-
* on elastic.co</a>
3374-
*/
3375-
3376-
public final <TDocument> CompletableFuture<KnnSearchResponse<TDocument>> knnSearch(
3377-
Function<KnnSearchRequest.Builder, ObjectBuilder<KnnSearchRequest>> fn, Class<TDocument> tDocumentClass) {
3378-
return knnSearch(fn.apply(new KnnSearchRequest.Builder()).build(), tDocumentClass);
3379-
}
3380-
3381-
/**
3382-
* Overload of {@link #knnSearch(KnnSearchRequest, Class)}, where Class is
3383-
* defined as Void, meaning the documents will not be deserialized.
3384-
*/
3385-
3386-
public CompletableFuture<KnnSearchResponse<Void>> knnSearch(KnnSearchRequest request) {
3387-
@SuppressWarnings("unchecked")
3388-
JsonEndpoint<KnnSearchRequest, KnnSearchResponse<Void>, ErrorResponse> endpoint = (JsonEndpoint<KnnSearchRequest, KnnSearchResponse<Void>, ErrorResponse>) KnnSearchRequest._ENDPOINT;
3389-
return this.transport.performRequestAsync(request, endpoint, this.transportOptions);
3390-
}
3391-
3392-
/**
3393-
* Overload of {@link #knnSearch(Function, Class)}, where Class is defined as
3394-
* Void, meaning the documents will not be deserialized.
3395-
*/
3396-
3397-
public final CompletableFuture<KnnSearchResponse<Void>> knnSearch(
3398-
Function<KnnSearchRequest.Builder, ObjectBuilder<KnnSearchRequest>> fn) {
3399-
return knnSearch(fn.apply(new KnnSearchRequest.Builder()).build(), Void.class);
3400-
}
3401-
3402-
/**
3403-
* Run a knn search.
3404-
* <p>
3405-
* NOTE: The kNN search API has been replaced by the <code>knn</code> option in
3406-
* the search API.
3407-
*
3408-
* @see <a href=
3409-
* "https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-knn-search">Documentation
3410-
* on elastic.co</a>
3411-
*/
3412-
3413-
public <TDocument> CompletableFuture<KnnSearchResponse<TDocument>> knnSearch(KnnSearchRequest request,
3414-
Type tDocumentType) {
3415-
@SuppressWarnings("unchecked")
3416-
JsonEndpoint<KnnSearchRequest, KnnSearchResponse<TDocument>, ErrorResponse> endpoint = (JsonEndpoint<KnnSearchRequest, KnnSearchResponse<TDocument>, ErrorResponse>) KnnSearchRequest._ENDPOINT;
3417-
endpoint = new EndpointWithResponseMapperAttr<>(endpoint,
3418-
"co.elastic.clients:Deserializer:_global.knn_search.Response.TDocument",
3419-
getDeserializer(tDocumentType));
3420-
3421-
return this.transport.performRequestAsync(request, endpoint, this.transportOptions);
3422-
}
3423-
3424-
/**
3425-
* Run a knn search.
3426-
* <p>
3427-
* NOTE: The kNN search API has been replaced by the <code>knn</code> option in
3428-
* the search API.
3429-
*
3430-
* @param fn
3431-
* a function that initializes a builder to create the
3432-
* {@link KnnSearchRequest}
3433-
* @see <a href=
3434-
* "https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-knn-search">Documentation
3435-
* on elastic.co</a>
3436-
*/
3437-
3438-
public final <TDocument> CompletableFuture<KnnSearchResponse<TDocument>> knnSearch(
3439-
Function<KnnSearchRequest.Builder, ObjectBuilder<KnnSearchRequest>> fn, Type tDocumentType) {
3440-
return knnSearch(fn.apply(new KnnSearchRequest.Builder()).build(), tDocumentType);
3441-
}
3442-
34433336
// ----- Endpoint: mget
34443337

34453338
/**

java-client/src/main/java/co/elastic/clients/elasticsearch/ElasticsearchClient.java

Lines changed: 0 additions & 110 deletions
Original file line numberDiff line numberDiff line change
@@ -68,8 +68,6 @@
6868
import co.elastic.clients.elasticsearch.core.IndexResponse;
6969
import co.elastic.clients.elasticsearch.core.InfoRequest;
7070
import co.elastic.clients.elasticsearch.core.InfoResponse;
71-
import co.elastic.clients.elasticsearch.core.KnnSearchRequest;
72-
import co.elastic.clients.elasticsearch.core.KnnSearchResponse;
7371
import co.elastic.clients.elasticsearch.core.MgetRequest;
7472
import co.elastic.clients.elasticsearch.core.MgetResponse;
7573
import co.elastic.clients.elasticsearch.core.MsearchRequest;
@@ -3355,114 +3353,6 @@ public InfoResponse info() throws IOException, ElasticsearchException {
33553353
return this.transport.performRequest(InfoRequest._INSTANCE, InfoRequest._ENDPOINT, this.transportOptions);
33563354
}
33573355

3358-
// ----- Endpoint: knn_search
3359-
3360-
/**
3361-
* Run a knn search.
3362-
* <p>
3363-
* NOTE: The kNN search API has been replaced by the <code>knn</code> option in
3364-
* the search API.
3365-
*
3366-
* @see <a href=
3367-
* "https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-knn-search">Documentation
3368-
* on elastic.co</a>
3369-
*/
3370-
3371-
public <TDocument> KnnSearchResponse<TDocument> knnSearch(KnnSearchRequest request, Class<TDocument> tDocumentClass)
3372-
throws IOException, ElasticsearchException {
3373-
@SuppressWarnings("unchecked")
3374-
JsonEndpoint<KnnSearchRequest, KnnSearchResponse<TDocument>, ErrorResponse> endpoint = (JsonEndpoint<KnnSearchRequest, KnnSearchResponse<TDocument>, ErrorResponse>) KnnSearchRequest._ENDPOINT;
3375-
endpoint = new EndpointWithResponseMapperAttr<>(endpoint,
3376-
"co.elastic.clients:Deserializer:_global.knn_search.Response.TDocument",
3377-
getDeserializer(tDocumentClass));
3378-
3379-
return this.transport.performRequest(request, endpoint, this.transportOptions);
3380-
}
3381-
3382-
/**
3383-
* Run a knn search.
3384-
* <p>
3385-
* NOTE: The kNN search API has been replaced by the <code>knn</code> option in
3386-
* the search API.
3387-
*
3388-
* @param fn
3389-
* a function that initializes a builder to create the
3390-
* {@link KnnSearchRequest}
3391-
* @see <a href=
3392-
* "https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-knn-search">Documentation
3393-
* on elastic.co</a>
3394-
*/
3395-
3396-
public final <TDocument> KnnSearchResponse<TDocument> knnSearch(
3397-
Function<KnnSearchRequest.Builder, ObjectBuilder<KnnSearchRequest>> fn, Class<TDocument> tDocumentClass)
3398-
throws IOException, ElasticsearchException {
3399-
return knnSearch(fn.apply(new KnnSearchRequest.Builder()).build(), tDocumentClass);
3400-
}
3401-
3402-
/**
3403-
* Overload of {@link #knnSearch(KnnSearchRequest, Class)}, where Class is
3404-
* defined as Void, meaning the documents will not be deserialized.
3405-
*/
3406-
3407-
public KnnSearchResponse<Void> knnSearch(KnnSearchRequest request) throws IOException, ElasticsearchException {
3408-
@SuppressWarnings("unchecked")
3409-
JsonEndpoint<KnnSearchRequest, KnnSearchResponse<Void>, ErrorResponse> endpoint = (JsonEndpoint<KnnSearchRequest, KnnSearchResponse<Void>, ErrorResponse>) KnnSearchRequest._ENDPOINT;
3410-
return this.transport.performRequest(request, endpoint, this.transportOptions);
3411-
}
3412-
3413-
/**
3414-
* Overload of {@link #knnSearch(Function, Class)}, where Class is defined as
3415-
* Void, meaning the documents will not be deserialized.
3416-
*/
3417-
3418-
public final KnnSearchResponse<Void> knnSearch(
3419-
Function<KnnSearchRequest.Builder, ObjectBuilder<KnnSearchRequest>> fn)
3420-
throws IOException, ElasticsearchException {
3421-
return knnSearch(fn.apply(new KnnSearchRequest.Builder()).build(), Void.class);
3422-
}
3423-
3424-
/**
3425-
* Run a knn search.
3426-
* <p>
3427-
* NOTE: The kNN search API has been replaced by the <code>knn</code> option in
3428-
* the search API.
3429-
*
3430-
* @see <a href=
3431-
* "https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-knn-search">Documentation
3432-
* on elastic.co</a>
3433-
*/
3434-
3435-
public <TDocument> KnnSearchResponse<TDocument> knnSearch(KnnSearchRequest request, Type tDocumentType)
3436-
throws IOException, ElasticsearchException {
3437-
@SuppressWarnings("unchecked")
3438-
JsonEndpoint<KnnSearchRequest, KnnSearchResponse<TDocument>, ErrorResponse> endpoint = (JsonEndpoint<KnnSearchRequest, KnnSearchResponse<TDocument>, ErrorResponse>) KnnSearchRequest._ENDPOINT;
3439-
endpoint = new EndpointWithResponseMapperAttr<>(endpoint,
3440-
"co.elastic.clients:Deserializer:_global.knn_search.Response.TDocument",
3441-
getDeserializer(tDocumentType));
3442-
3443-
return this.transport.performRequest(request, endpoint, this.transportOptions);
3444-
}
3445-
3446-
/**
3447-
* Run a knn search.
3448-
* <p>
3449-
* NOTE: The kNN search API has been replaced by the <code>knn</code> option in
3450-
* the search API.
3451-
*
3452-
* @param fn
3453-
* a function that initializes a builder to create the
3454-
* {@link KnnSearchRequest}
3455-
* @see <a href=
3456-
* "https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-knn-search">Documentation
3457-
* on elastic.co</a>
3458-
*/
3459-
3460-
public final <TDocument> KnnSearchResponse<TDocument> knnSearch(
3461-
Function<KnnSearchRequest.Builder, ObjectBuilder<KnnSearchRequest>> fn, Type tDocumentType)
3462-
throws IOException, ElasticsearchException {
3463-
return knnSearch(fn.apply(new KnnSearchRequest.Builder()).build(), tDocumentType);
3464-
}
3465-
34663356
// ----- Endpoint: mget
34673357

34683358
/**

0 commit comments

Comments
 (0)