|
68 | 68 | import co.elastic.clients.elasticsearch.core.IndexResponse; |
69 | 69 | import co.elastic.clients.elasticsearch.core.InfoRequest; |
70 | 70 | import co.elastic.clients.elasticsearch.core.InfoResponse; |
71 | | -import co.elastic.clients.elasticsearch.core.KnnSearchRequest; |
72 | | -import co.elastic.clients.elasticsearch.core.KnnSearchResponse; |
73 | 71 | import co.elastic.clients.elasticsearch.core.MgetRequest; |
74 | 72 | import co.elastic.clients.elasticsearch.core.MgetResponse; |
75 | 73 | import co.elastic.clients.elasticsearch.core.MsearchRequest; |
@@ -3355,114 +3353,6 @@ public InfoResponse info() throws IOException, ElasticsearchException { |
3355 | 3353 | return this.transport.performRequest(InfoRequest._INSTANCE, InfoRequest._ENDPOINT, this.transportOptions); |
3356 | 3354 | } |
3357 | 3355 |
|
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 | | - |
3466 | 3356 | // ----- Endpoint: mget |
3467 | 3357 |
|
3468 | 3358 | /** |
|
0 commit comments