-
-
Notifications
You must be signed in to change notification settings - Fork 23.7k
Fix (OpenSearch 3.x Compatibility): Adds configurable vector search engine #5676
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
base: main
Are you sure you want to change the base?
Fix (OpenSearch 3.x Compatibility): Adds configurable vector search engine #5676
Conversation
…h 3.x compatibility
Summary of ChangesHello @AhmedRaafat14, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request addresses a critical compatibility issue with OpenSearch 3.x by introducing new configuration options for the vector search engine and space type within the OpenSearch node. This enhancement allows users to select appropriate settings for their OpenSearch version, ensuring seamless integration and preventing index creation failures caused by the deprecation of the 'nmslib' engine in OpenSearch 3.0. The changes are designed to be fully backward compatible, providing flexibility for both new and existing deployments. Highlights
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code Review
This pull request effectively addresses the compatibility issue with OpenSearch 3.x by introducing configurable engine and spaceType parameters. The changes are well-implemented, backward-compatible, and include sensible defaults for new users. My review includes a couple of suggestions to improve code maintainability by reducing duplication and adding explanatory comments for type casting workarounds. Overall, this is a solid contribution that enhances the OpenSearch node's flexibility.
packages/components/nodes/vectorstores/OpenSearch/OpenSearch.ts
Outdated
Show resolved
Hide resolved
packages/components/nodes/vectorstores/OpenSearch/OpenSearch.ts
Outdated
Show resolved
Hide resolved
|
/gemini review |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code Review
This pull request successfully adds compatibility with OpenSearch 3.x by introducing configurable engine and spaceType parameters, which is a great improvement. The changes are well-structured, using a helper function to avoid code duplication when creating the vector store, and the implementation is backward compatible as described. My main feedback is a minor point on improving maintainability by avoiding duplicated default values for the new parameters. Overall, this is a solid contribution that addresses an important compatibility issue.
|
@HenryHengZJ Can you please check this PR 🙏 ! |
HenryHengZJ
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thank you!
Summary
Adds configurable vector search engine and space type parameters to the OpenSearch vector store node, enabling compatibility with OpenSearch 3.x while maintaining backward compatibility with older versions.
Problem
OpenSearch 3.0 deprecated the
nmslibengine for k-NN vector search, causing index creation failures with the error:nmslib engine is deprecated in OpenSearch and cannot be used for new index creation in OpenSearch from 3.0.0Users upgrading to OpenSearch 3.x could not use Flowise's OpenSearch integration without modifying source code.
Solution
Adds two new configurable parameters to the OpenSearch node:
lucene(default),faiss, ornmslib(legacy)l2(default),cosinesimil, orinnerproductThis allows users to select the appropriate engine for their OpenSearch version while maintaining full backward compatibility.
Key Features
nmsliblucene+l2which works with OpenSearch 2.x+Files Changed
Modified
enginedropdown input (lucene/faiss/nmslib)spaceTypedropdown input (l2/cosinesimil/innerproduct)Test Plan
luceneengine → succeedsfaissengine → succeedsnmslibengine → succeedslucene/l2Breaking Changes
None - fully backward compatible. Default engine changed from
nmslibtolucene, but this only affects new index creation. Existing indexes continue to work.Related
as anycast)Screenshots