Skip to content

Commit bce7851

Browse files
committed
remove deprecated endpoint
1 parent 7b4d59f commit bce7851

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;
@@ -3346,111 +3344,6 @@ public CompletableFuture<InfoResponse> info() {
33463344
return this.transport.performRequestAsync(InfoRequest._INSTANCE, InfoRequest._ENDPOINT, this.transportOptions);
33473345
}
33483346

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

34563349
/**

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;
@@ -3366,114 +3364,6 @@ public InfoResponse info() throws IOException, ElasticsearchException {
33663364
return this.transport.performRequest(InfoRequest._INSTANCE, InfoRequest._ENDPOINT, this.transportOptions);
33673365
}
33683366

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

34793369
/**

0 commit comments

Comments
 (0)