Skip to content

Conversation

@sethmlarson
Copy link
Contributor

@sethmlarson sethmlarson commented Oct 21, 2021

Adds the knn_search API. @jtibshirani could you take a look and let me know if there are missing parameters? I looked over the PRs and saw some chatter about docvalues_fields, stored_fields, etc but didn't see those values in the query parameter section of the API so went with only routing.

@sethmlarson sethmlarson requested review from a team and jtibshirani October 21, 2021 15:34
@jtibshirani
Copy link

@sethmlarson thanks for tackling this! In addition to fields, the body of the request also supports the following sections. These have the same definition/ behavior as in the _search endpoint:

  • _source
  • docvalue_fields
  • stored_fields

They are not available as query parameters, unlike in the _search endpoint.

@sethmlarson
Copy link
Contributor Author

@delvedor @jtibshirani I believe I've resolved the review comments. Let me know if things look good.

Copy link

@jtibshirani jtibshirani left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me!

@sethmlarson sethmlarson merged commit acde8b9 into main Oct 26, 2021
@sethmlarson sethmlarson deleted the knn-search branch October 26, 2021 19:50
@sethmlarson
Copy link
Contributor Author

sethmlarson commented Oct 26, 2021

This PR can't be backported because the JSON specs haven't been updated in some time on 7.x/7.16.

@jtibshirani
Copy link

@sethmlarson kNN search will only be available in ES 8.0, so it won't appear in the spec on 7.x.

@sethmlarson
Copy link
Contributor Author

@jtibshirani That explains it!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants