Skip to content

Latest commit

 

History

History
85 lines (79 loc) · 7.63 KB

README.md

File metadata and controls

85 lines (79 loc) · 7.63 KB

Build examples

$ make test

Try the examples

Once the make test is done, you will see some executable examples under the path ./cmake_build/examples.

New applications should follow the MilvusClientV2 examples. The original MilvusClient examples are retained for compatibility with existing applications and demonstrate the legacy API, which is in maintenance mode.

To suppress verbose gRPC internal logs when running the examples, set:

export GRPC_VERBOSITY=ERROR

Legacy examples for MilvusClient (maintenance mode):

  • ./cmake_build/examples/v1/sdk_array_v1: example to show the usage of Array field.
  • ./cmake_build/examples/v1/sdk_db_v1: example to show the usage of databases.
  • ./cmake_build/examples/v1/sdk_default_value_v1: example to show the usage of default value.
  • ./cmake_build/examples/v1/sdk_dml_v1: example to show the usage of dml interfaces.
  • ./cmake_build/examples/v1/sdk_dynamic_field_v1: example to show the usage of dynamic fields.
  • ./cmake_build/examples/v1/sdk_filter_template_v1: example to show the usage of filter template.
  • ./cmake_build/examples/v1/sdk_full_text_match_v1: example to show the usage of BM25 function.
  • ./cmake_build/examples/v1/sdk_general_v1: a general example to show the basic usage.
  • ./cmake_build/examples/v1/sdk_group_by_v1: a general example to show the usage of grouping search.
  • ./cmake_build/examples/v1/sdk_hybrid_search_v1: example to show the usage of hybrid search interface.
  • ./cmake_build/examples/v1/sdk_iterator_query_v1: example to show the usage of query iterator.
  • ./cmake_build/examples/v1/sdk_iterator_search_v1: example to show the usage of search iterator.
  • ./cmake_build/examples/v1/sdk_json_v1: example to show the usage of JSON field.
  • ./cmake_build/examples/v1/sdk_nullable_field_v1: example to show the usage of nullable field.
  • ./cmake_build/examples/v1/sdk_partition_key_v1: example to show the usage of partition key.
  • ./cmake_build/examples/v1/sdk_rbac_v1: example to show the usage of RBAC.
  • ./cmake_build/examples/v1/sdk_run_analyzer_v1: example to show the usage of run_analyzer().
  • ./cmake_build/examples/v1/sdk_text_match_v1: example to show the usage of TEXT_MATCH.
  • ./cmake_build/examples/v1/sdk_vector_binary_v1: example to show the usage of BinaryVector field.
  • ./cmake_build/examples/v1/sdk_vector_fp16_v1: example to show the usage of Float16Vector/BFloat16Vector field.
  • ./cmake_build/examples/v1/sdk_vector_sparse_v1: example to show the usage of SparseVector field.

Recommended examples for MilvusClientV2:

  • ./cmake_build/examples/v2/sdk_alias_v2: example to show the usage of aliases, including createAlias(), listAliases(), describeAlias(), alterAlias() and dropAlias().
  • ./cmake_build/examples/v2/sdk_array_v2: example to show the usage of Array field.
  • ./cmake_build/examples/v2/sdk_cdc_v2: example to show the usage of CDC interfaces including DumpMessages().
  • ./cmake_build/examples/v2/sdk_db_v2: example to show the usage of databases.
  • ./cmake_build/examples/v2/sdk_default_value_v2: example to show the usage of default value.
  • ./cmake_build/examples/v2/sdk_dml_v2: example to show the usage of dml interfaces.
  • ./cmake_build/examples/v2/sdk_dynamic_field_v2: example to show the usage of dynamic fields.
  • ./cmake_build/examples/v2/sdk_external_table_v2: example to show the usage of external collection refresh interfaces.
  • ./cmake_build/examples/v2/sdk_filter_template_v2: example to show the usage of filter template.
  • ./cmake_build/examples/v2/sdk_function_chain_v2: example to show the usage of function chain for search.
  • ./cmake_build/examples/v2/sdk_full_text_match_v2: example to show the usage of BM25 function.
  • ./cmake_build/examples/v2/sdk_general_v2: a general example to show the basic usage.
  • ./cmake_build/examples/v2/sdk_highlighter_v2: example to show the usage of lexical highlighter with BM25 text search.
  • ./cmake_build/examples/v2/sdk_geometry_field_v2: a general example to show the usage of Geometry field.
  • ./cmake_build/examples/v2/sdk_group_by_v2: a general example to show the usage of grouping search.
  • ./cmake_build/examples/v2/sdk_hybrid_search_v2: example to show the usage of hybrid search interface.
  • ./cmake_build/examples/v2/sdk_index_v2: example to show the usage of index interfaces, including createIndex(), listIndexes(), describeIndex(), alterIndexProperties(), dropIndexProperties() and dropIndex().
  • ./cmake_build/examples/v2/sdk_iterator_query_v2: example to show the usage of query iterator.
  • ./cmake_build/examples/v2/sdk_iterator_search_v2: example to show the usage of search iterator.
  • ./cmake_build/examples/v2/sdk_json_v2: example to show the usage of JSON field.
  • ./cmake_build/examples/v2/sdk_minhash_function_v2: example to show the usage of the MinHash function for text deduplication.
  • ./cmake_build/examples/v2/sdk_multi_analyzer_v2: example to show the usage of multi-analyzer for full text match.
  • ./cmake_build/examples/v2/sdk_nullable_field_v2: example to show the usage of nullable field.
  • ./cmake_build/examples/v2/sdk_nullable_vector_v2: example to show the usage of nullable vector fields.
  • ./cmake_build/examples/v2/sdk_optimize_v2: example to show the usage of Optimize().
  • ./cmake_build/examples/v2/sdk_order_by_v2: example to show the usage of ORDER BY for search and query.
  • ./cmake_build/examples/v2/sdk_partition_key_v2: example to show the usage of partition key.
  • ./cmake_build/examples/v2/sdk_partition_v2: example to show the usage of partitions, including createPartition(), hasPartition(), loadPartitions(), GetPartitionStatistics(), releasePartitions() and dropPartition().
  • ./cmake_build/examples/v2/sdk_rbac_v2: example to show the usage of RBAC.
  • ./cmake_build/examples/v2/sdk_rerank_function_v2: example to show the usage of rerank function.
  • ./cmake_build/examples/v2/sdk_rls_v2: example to show the usage of row-level security (RLS), including row policies and principal tags.
  • ./cmake_build/examples/v2/sdk_run_analyzer_v2: example to show the usage of run_analyzer().
  • ./cmake_build/examples/v2/sdk_running_requests_v2: example to list the running requests with ListRunningRequests() and cancel them with CancelRequests().
  • ./cmake_build/examples/v2/sdk_search_aggregation_v2: example to show the usage of search aggregation.
  • ./cmake_build/examples/v2/sdk_simple_v2: example to quickly create a simple collection.
  • ./cmake_build/examples/v2/sdk_snapshot_v2: example to show the usage of snapshot interfaces.
  • ./cmake_build/examples/v2/sdk_struct_field_v2: example to show the usage of struct field: multi-vector sub-fields, embedding-list and element-level search, element-level null (nullable sub-fields, nested Array sub-fields, whole null struct rows), addCollectionStructField(), and struct sub-field add/drop. Requires the element-null server stack.
  • ./cmake_build/examples/v2/sdk_text_field_v2: example to show the usage of Text field with row/column-based insert and query decoding. Requires the server to enable common.storage.useLoonFFI (Storage V3); excluded from run_examples.sh.
  • ./cmake_build/examples/v2/sdk_text_match_v2: example to show the usage of TEXT_MATCH.
  • ./cmake_build/examples/v2/sdk_timestamptz_field_v2: example to show the usage of Timestamptz field.
  • ./cmake_build/examples/v2/sdk_vector_binary_v2: example to show the usage of BinaryVector field.
  • ./cmake_build/examples/v2/sdk_vector_fp16_v2: example to show the usage of Float16Vector/BFloat16Vector field.
  • ./cmake_build/examples/v2/sdk_vector_int8_v2: example to show the usage of Int8Vector field.
  • ./cmake_build/examples/v2/sdk_vector_sparse_v2: example to show the usage of SparseVector field.