Skip to content

Docs for lookup query vector builder in knn.md#5179

Merged
benwtrent merged 5 commits intomainfrom
adding-lookup-for-knn
Mar 5, 2026
Merged

Docs for lookup query vector builder in knn.md#5179
benwtrent merged 5 commits intomainfrom
adding-lookup-for-knn

Conversation

@benwtrent
Copy link
Copy Markdown
Member

Adding docs for the new lookup query vector builder. Waiting on elastic/elasticsearch#141488 to be merged.

@benwtrent benwtrent requested a review from a team as a code owner February 17, 2026 15:09
@benwtrent benwtrent added the documentation Improvements or additions to documentation label Feb 17, 2026
@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Feb 17, 2026

✅ Vale Linting Results

No issues found on modified lines!


The Vale linter checks documentation changes against the Elastic Docs style guide.

To use Vale locally or report issues, refer to Elastic style guide for Vale.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Feb 26, 2026

🔍 Preview links for changed docs

Copy link
Copy Markdown
Member

@leemthompo leemthompo left a comment

Choose a reason for hiding this comment

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

LGTM with a question and teeny nits :)

(...)
```

1. The task to perform. In this case, it is `lookup`.
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Suggested change
1. The task to perform. In this case, it is `lookup`.
1. Use the `lookup` query vector builder to retrieve the vector from an existing document.

nit: this callout doesn't quite fit


If your query vector already exists in Elasticsearch, use the `lookup` query vector builder to fetch that vector directly from a document at search time.

Use `lookup` when you want query-by-example workflows, such as:
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Would we have a link to a definition of query-by-example?

If it isn't defined satisfactorily we could just just drop "query-by-example workflows, such as" and lead straight into the bullets:

Use `lookup` when you want to:

- Find similar items for recommendations
- Retrieve related content from a seed document
- Avoid an extra client round-trip to fetch a vector before searching

Another nit is to use parallel phrasing in lists for readability, ideally starting with action verbs 🤓


### Use `lookup` to build the query vector [knn-query-vector-lookup]
```{applies_to}
stack: ga 9.4
Copy link
Copy Markdown
Member

@leemthompo leemthompo Mar 2, 2026

Choose a reason for hiding this comment

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

FYI this PR shouldn't merge until the feature is live on serverless :)

@leemthompo leemthompo changed the title adding lookup Docs for lookup query vector builder in knn.md Mar 2, 2026
@benwtrent benwtrent enabled auto-merge (squash) March 5, 2026 20:19
@benwtrent benwtrent merged commit f383509 into main Mar 5, 2026
8 checks passed
@benwtrent benwtrent deleted the adding-lookup-for-knn branch March 5, 2026 20:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants