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
OpenSearchVectorSearch doesn't permit the user to specify a field name #2500
Comments
@weaversam8 Thank you for your feedback. Will work on it and raise the PR soon to provide customized field names. |
I'm actually working on a PR now, so I can give you a good starting point :) I think the ability to specify the text field would also be helpful, so I'm planning on squeezing that into my PR as well. |
Sounds good. Thank you for your contributions to OpenSearch. |
Done, let me know what you think. |
@weaversam8 I just reviewed your PR, everything looks good except a couple of things:
I have addressed these changes in my PR. Also, I have included the changes to add |
@hwchase17 Could you please tag me and @vamshin if any new PRs or github issues are created that are related to OpenSearch. We would like to contribute by addressing those issues and reviewing those PRs. |
**Description** Add custom vector field name and text field name while indexing and querying for OpenSearch **Issues** #2500 Signed-off-by: Naveen Tatikonda <navtat@amazon.com>
**Description** Add custom vector field name and text field name while indexing and querying for OpenSearch **Issues** langchain-ai/langchain#2500 Signed-off-by: Naveen Tatikonda <navtat@amazon.com>
Currently the
OpenSearchVectorSearch
class defaults tovector_field
as the field name of the vector field in all vector similarity searches.This works fine if you're populating your OpenSearch instance with data via LangChain, but doesn't work well if you're attempting to query a vector field with a different name that's been populated by some other process. For maximum utility, users should be able to customize which field is being queried.
The text was updated successfully, but these errors were encountered: