Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add template query #9119

Merged
merged 7 commits into from
Jan 29, 2025
Merged

Conversation

mingshl
Copy link
Contributor

@mingshl mingshl commented Jan 28, 2025

Description

Add template query documenation

Issues Resolved

Closes #[8969]

Version

2.19

Frontend features

Checklist

  • By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license and subject to the Developers Certificate of Origin.
    For more information on following Developer Certificate of Origin and signing off your commits, please check here.

Signed-off-by: Mingshi Liu <[email protected]>
Copy link

Thank you for submitting your PR. The PR states are In progress (or Draft) -> Tech review -> Doc review -> Editorial review -> Merged.

Before you submit your PR for doc review, make sure the content is technically accurate. If you need help finding a tech reviewer, tag a maintainer.

When you're ready for doc review, tag the assignee of this PR. The doc reviewer may push edits to the PR directly or leave comments and editorial suggestions for you to address (let us know in a comment if you have a preference). The doc reviewer will arrange for an editorial review.

@kolchfa-aws kolchfa-aws added release-notes PR: Include this PR in the automated release notes v2.19.0 labels Jan 28, 2025
mingshl and others added 3 commits January 28, 2025 09:55
Signed-off-by: Fanit Kolchina <[email protected]>
Signed-off-by: Mingshi Liu <[email protected]>
Copy link
Collaborator

@natebower natebower left a comment

Choose a reason for hiding this comment

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

@kolchfa-aws @mingshl Please see my comments and changes and let me know if you have any questions. Thanks!

_query-dsl/specialized/template.md Outdated Show resolved Hide resolved
_query-dsl/specialized/template.md Outdated Show resolved Hide resolved
_search-plugins/search-relevance/query-rewriting.md Outdated Show resolved Hide resolved
# Query rewriting

Query rewriting is the process of transforming or modifying a user query before it is executed. The goal of query rewriting is to improve search accuracy, relevance, or performance by addressing issues such as misspellings, synonyms, ambiguous terms, or query structure. Query rewriting is commonly used in search systems to enhance the quality of search results.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Line 12: "query structure" has to be qualified as an issue, so I chose this adjective, but you can replace it if there's a better word.

_search-plugins/search-relevance/query-rewriting.md Outdated Show resolved Hide resolved

### Step 3: Search using a template query

Use the following template query to search the index. The `ml_inference` processor takes the input text `sneakers`, generates a vector embedding, replaces `${text_embedding}` with the generated vector, and searches for documents closest to the vector:
Copy link
Collaborator

Choose a reason for hiding this comment

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

"The ml_inference processor takes the input text sneakers, generates a vector embedding," => "The ml_inference processor generates a vector embedding from the input text sneakers,"?

Co-authored-by: Nathan Bower <[email protected]>
Signed-off-by: kolchfa-aws <[email protected]>
@kolchfa-aws kolchfa-aws merged commit f6ea097 into opensearch-project:main Jan 29, 2025
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
release-notes PR: Include this PR in the automated release notes v2.19.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[DOC] Introduce Template Query to OpenSearch
4 participants