Conversation
Signed-off-by: Grégoire Verdier <g.verdier@criteo.com>
Summary of ChangesHello @verdie-g, 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 significantly enhances the Milvus .NET client by implementing full support for BM25 full-text search. It introduces new schema definitions for functions and fields to enable text analysis and sparse vector generation, alongside new API methods for performing BM25-specific searches and integrating them into hybrid search workflows. This allows users to perform advanced text-based retrieval operations directly through the client. Highlights
🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console. 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
|
| SimilarityMetricType.Bm25, | ||
| extraParams: new Dictionary<string, string> | ||
| { | ||
| ["inverted_index_algo"] = "\"DAAT_WAND\"", |
There was a problem hiding this comment.
Awkward quotes. @roji big breaking change but should extraParams be a Dictionary<string, object>?
There was a problem hiding this comment.
Code Review
This pull request introduces support for BM25 full-text search, which is a great addition to the client's capabilities. The changes are well-structured, introducing new concepts like FunctionSchema and TextAnnSearchRequest and integrating them cleanly into the existing object model. The new APIs are clearly documented, and the comprehensive test suite ensures the functionality is working as expected. I have one minor suggestion to improve input validation for the new search method.
| Verify.NotNull(queries); | ||
|
|
There was a problem hiding this comment.
It's good that you're verifying that queries is not null. However, you should also check if the list is empty. Sending an empty list of queries to the server might lead to an unclear error or unexpected behavior. It's better to fail fast with a clear ArgumentException if no queries are provided, similar to how it's done in TextAnnSearchRequest.
Verify.NotNull(queries);
if (queries.Count == 0)
{
throw new ArgumentException("At least one query must be provided.", nameof(queries));
}There was a problem hiding this comment.
That's not consistent with other search methods.
Signed-off-by: Grégoire Verdier <g.verdier@criteo.com>
No description provided.