Skip to content

Add documentation for knn option#88667

Merged
jtibshirani merged 3 commits intoelastic:knn-searchfrom
jtibshirani:knn-search-docs
Jul 21, 2022
Merged

Add documentation for knn option#88667
jtibshirani merged 3 commits intoelastic:knn-searchfrom
jtibshirani:knn-search-docs

Conversation

@jtibshirani
Copy link
Copy Markdown
Contributor

@jtibshirani jtibshirani commented Jul 21, 2022

This change adds docs for the new search knn option:

  • Add knn option to _search API docs.
  • Update the kNN search guide to use the _search endpoint instead of
    _knn_search endpoint. Move relevant information from the _knn_search API
    docs to this guide, like the filtering example.
  • Add an example to the kNN search guide of configuring index_options (just
    seemed nice to have, not core to this change).

The PR doesn't deprecate the _knn_search endpoint yet.

Addresses #87625.

@jtibshirani jtibshirani added >docs General docs changes :Search/Search Search-related issues that do not fall into other categories v8.4.0 labels Jul 21, 2022
@elasticsearchmachine elasticsearchmachine added Team:Docs Meta label for docs team Team:Search Meta label for search team labels Jul 21, 2022
@elasticsearchmachine
Copy link
Copy Markdown
Collaborator

Pinging @elastic/es-docs (Team:Docs)

@elasticsearchmachine
Copy link
Copy Markdown
Collaborator

Pinging @elastic/es-search (Team:Search)

`0` and `1.0` decreases the score.
====

experimental::[]
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Is the newknn section within _search API is also experimental?
I was under impression that it is not experimental anymore.

cc @giladgal

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

In our discussions, we said that integrating ANN into the _search endpoint is a separate step from making the feature GA. Before GA, we still have a few items to tackle (like adding telemetry, improving index performance, etc.)

[[search-api-knn]]
`knn`::
(Required, object) Defines the kNN query to run.
+
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Should we include a reference here to the approximate-knn section of the knn-search.asciidoc? I was thinking if a user stumble on this page, they would not know that we have mode details on knn search.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Good idea, I'll add a link. I also realized this should be "Optional" instead of "Required".

Copy link
Copy Markdown
Contributor

@mayya-sharipova mayya-sharipova left a comment

Choose a reason for hiding this comment

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

@jtibshirani Thanks, this LGTM. I left two small comments.

@jtibshirani jtibshirani added :Search Relevance/Vectors Vector search and removed :Search/Search Search-related issues that do not fall into other categories labels Jul 21, 2022
@jtibshirani
Copy link
Copy Markdown
Contributor Author

Thanks for the review! I'm going to merge, but happy to discuss anything further.

@jtibshirani jtibshirani merged commit 85cb107 into elastic:knn-search Jul 21, 2022
@jtibshirani jtibshirani deleted the knn-search-docs branch July 21, 2022 17:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

>docs General docs changes :Search Relevance/Vectors Vector search Team:Docs Meta label for docs team Team:Search Meta label for search team v8.4.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants