Skip to content

Add knn search parameter and remove knn query #2919

Closed
@puppylpg

Description

@puppylpg

KnnQuery and KnnSearch are two different classes in elasticsearch java client and are for different queries:

They both have different parameters and different classes in elasticsearch java client. However, in the current spring data elasticsearch implementation, they are mixed together and are all converted into KnnSearch finally.

So I wanna submit a PR to:

  1. remove KnnQuery in NativeQuery: and I think this clause should be constructed inside the co.elastic.clients.elasticsearch._types.query_dsl.Query in NativeQuery by user manually;
  2. add withKnnSearches method in NativeQueryBuilder: this may be a loss without which KnnSearch can't be constructed by user;
  3. add knn search mapping parameters in elasticsearch 8;

If there are questions about the issues above, we can discuss further.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions