Provide support to increase developer productivity in Java when using Elasticsearch. Uses familiar Spring concepts such as a template classes for core API usage and lightweight repository style data access.
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:
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;
add withKnnSearches method in NativeQueryBuilder: this may be a loss without which KnnSearch can't be constructed by user;
add knn search mapping parameters in elasticsearch 8;
If there are questions about the issues above, we can discuss further.
KnnQuery
andKnnSearch
are two different classes in elasticsearch java client and are for different queries:KnnSearch
: is the top levelknn
query in the elasticsearch request;KnnQuery
: is theknn
query insidequery
clause;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:
KnnQuery
inNativeQuery
: and I think this clause should be constructed inside theco.elastic.clients.elasticsearch._types.query_dsl.Query
inNativeQuery
by user manually;withKnnSearches
method inNativeQueryBuilder
: this may be a loss without whichKnnSearch
can't be constructed by user;If there are questions about the issues above, we can discuss further.