Refactor(FindSimiliar): MilvusCache to use Milvus Search API #352
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Replaces manual similarity calculation and query-based retrieval in FindSimilar with Milvus's Search API for more efficient and accurate similarity search. Updates index creation to use the new HNSW index API. Improves cache hit/miss logic and error handling.
What type of PR is this?
refactor(FindSimilar): Migrate to Milvus for similarity search
What this PR does / why we need it:
This PR refactors the FindSimilar functionality to use the Milvus vector database for similarity search, replacing the previous manual calculation and query-based retrieval logic.
Key changes include:
Adopting Milvus Search API: All similarity search operations now leverage Milvus's native Search API, which is highly optimized for performance and accuracy.
HNSW Indexing: The index creation process has been updated to use the new HNSW (Hierarchical Navigable Small World) index API, which provides faster and more accurate search results for large-scale vector data.
Code Improvements: The caching logic has been streamlined, and error handling for interactions with the Milvus service has been made more robust.
This migration was necessary to improve the efficiency, scalability, and accuracy of our similarity search feature, reducing the maintenance overhead of the custom-built solution using Go.
Which issue(s) this PR fixes:
Fixes #150
Release Notes: No