add: COSINE metric and text sparse search#92
Conversation
Add convenient constructor methods for FieldSchema to support all data types: - Basic types: bool, int8/16/32/64, float, double, string - Primary key types with auto_id support - Vector types: binary vector, float vector, sparse float vector - VarChar with max_length validation feat: add COSINE metric type and enhance test coverage - Add COSINE to MetricType enum for vector similarity search - Update test cases to cover both L2 and COSINE metric types - Add vector field to client test schema - Update .gitignore to exclude volumes directory - Change test server URL from localhost to 127.0.0.1 - Clean up docker-compose configuration This commit extends the SDK's metric type support and improves test coverage by running tests with multiple metric types. The changes also include some infrastructure improvements for better test reliability. upgrade: milvus-proto feat: add builder pattern and fix missing proto fields - Add derive(Builder) pattern support for protobuf message structs - Add clippy::derive_partial_eq_without_eq attributes to proto messages - Fix missing fields in collection operations: - Add load_fields and skip_load_dynamic_field to LoadCollectionRequest - Add major_compaction, collection_name, db_name to ManualCompactionRequest - Add valid_data field to FieldData - Add schema_timestamp to Insert/Upsert requests - Add consistency_level and expr_template_values to Delete request This commit improves code generation and completes missing proto fields required by the latest Milvus protocol. init default values add new_sparse_float_vector function feat(collection): implement collection management and operations - Add collection example demonstrating basic usage - Implement collection schema builder with field configuration - Add support for collection operations (upsert, search, range search) - Include test cases for collection functionality - Add options for collection creation and loading fix(test): adjust range search test for different metric types - Remove unnecessary flush calls in collection tests - Add metric-specific thresholds for L2 and COSINE distance - Update range filter assertions to match metric type expectations - Handle L2 and COSINE metrics separately in range search validation test: Add text search validation with score threshold Add test case to verify text search functionality in collection tests. The test ensures search results meet minimum score threshold (>=0.2) and validates correct field name handling for text fields. chore: update .gitignore and improve code formatting - Add .vscode/ to .gitignore - Improve README.md formatting and update code examples - Format test module code for better readability refactor: improve code formatting and test cleanup - Format Rust code for better readability across test files - Add proper collection cleanup in add debug derive
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: BenLocal The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
|
Welcome @BenLocal! It looks like this is your first PR to milvus-io/milvus-sdk-rust 🎉 |
|
@BenLocal Thanks for your contribution. Please submit with DCO, see the contributing guide https://github.com/milvus-io/milvus/blob/master/CONTRIBUTING.md#developer-certificate-of-origin-dco. |
|
@BenLocal Please associate the related issue to the body of your Pull Request. (eg. “issue: #187”) |
|
We need this :) hope this merges soon |
milvus-prototo master version