Package org.zvec.binding
Class ZvecNative
java.lang.Object
org.zvec.binding.presets.ZvecConfig
org.zvec.binding.ZvecNative
- All Implemented Interfaces:
org.bytedeco.javacpp.tools.InfoMapper
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classByte array structurestatic classCollection options (opaque pointer) Use zvec_collection_options_create() to create and zvec_collection_options_destroy() to destroystatic classstatic classCollection statistics (opaque pointer) Use zvec_collection_stats_get functions to access fieldsstatic classCollection handle (opaque pointer) Internally maps to std::shared_ptr<zvec::Collection>*.static classConfiguration data (opaque pointer) Corresponds to zvec::GlobalConfig::ConfigData Use zvec_config_data_create() to create and zvec_config_data_destroy() to destroystatic classDiskANN query parameters handle (opaque pointer) Internally maps to zvec::DiskAnnQueryParams* (raw pointer).static classDocument field structurestatic classOpaque handle for a document iterator.static classDocument object (opaque pointer, forward declaration for reranker callback)static classError details structurestatic classField schema handle (opaque pointer) Internally maps to zvec::FieldSchema* (raw pointer).static classDocument field value unionstatic classFlat query parameters handle (opaque pointer) Internally maps to zvec::FlatQueryParams* (raw pointer).static classFloat array structurestatic classFTS query parameters handle (opaque pointer) Internally maps to zvec::FtsQueryParams* (raw pointer).static classFTS query payload structure (opaque pointer) Aligned with zvec::Fts Use zvec_fts_create() to create and zvec_fts_destroy() to destroystatic classGrouped vector query structure (opaque pointer) Aligned with zvec::GroupByVectorQuery Use zvec_group_by_vector_query_create() to create and zvec_group_by_vector_query_destroy() to destroystatic classHNSW query parameters handle (opaque pointer) Internally maps to zvec::HnswQueryParams* (raw pointer).static classIndex parameters (opaque pointer) Use zvec_index_params_create() to create and zvec_index_params_destroy() to destroy.static classInteger array structurestatic classOpaque handle for iterator options.static classIVF query parameters handle (opaque pointer) Internally maps to zvec::IVFQueryParams* (raw pointer).static classIVF RaBitQ query parameters handle (opaque pointer) Internally maps to zvec::IvfRabitqQueryParams* (raw pointer).static classLog configuration base type (opaque pointer) Corresponds to zvec::GlobalConfig::LogConfig Use factory functions to create specific log configurations: - zvec_config_log_create_console() for console logging - zvec_config_log_create_file() for file loggingstatic classMulti-query query structure (opaque pointer) Aligned with zvec::MultiQuery Use zvec_multi_query_create() to create and zvec_multi_query_destroy() to destroystatic classMutable byte array structurestatic classString array structurestatic classMutable string structure (owns memory)static classString view structure (does not own memory)static classSub-query structure for multi-query (opaque pointer) Aligned with zvec::SubQuery Use zvec_sub_query_create() to create and zvec_sub_query_destroy() to destroystatic classVamana query parameters handle (opaque pointer) Internally maps to zvec::VamanaQueryParams* (raw pointer).static classVector query structure (opaque pointer) Backed by zvec::SearchQuery internally; the C symbol name is kept for backward compatibility.static classPer-document status returned by detailed DML APIs. -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intData type codes (must match zvec::DataType in zvec/db/type.h) These are defined as uint32_t constants instead of C enums to ensure consistent binary representation across C and C++ boundaries.static final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intenum zvec_doc_operator_tstatic final intenum zvec_doc_operator_tstatic final intenum zvec_doc_operator_tstatic final intenum zvec_doc_operator_tstatic final intenum zvec_error_code_tstatic final intenum zvec_error_code_tstatic final intenum zvec_error_code_tstatic final intenum zvec_error_code_tstatic final intenum zvec_error_code_tstatic final intenum zvec_error_code_tstatic final intenum zvec_error_code_tstatic final intenum zvec_error_code_tstatic final intenum zvec_error_code_tstatic final intenum zvec_error_code_tstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intIndex type codes (must match zvec::IndexType in zvec/db/type.h) These are defined as uint32_t constants instead of C enums to ensure consistent binary representation across C and C++ boundaries.static final intstatic final intio_uring via raw kernel syscalls (zero dependency)static final intlibaio loaded at runtime via dlopen()static final intSynchronous pread(); no async I/Ostatic final intenum zvec_log_level_tstatic final intenum zvec_log_level_tstatic final intenum zvec_log_level_tstatic final intenum zvec_log_level_tstatic final intenum zvec_log_level_tstatic final intenum zvec_log_type_tstatic final intenum zvec_log_type_tstatic final intstatic final intstatic final intstatic final intstatic final intDistance metric type codes (must match zvec::MetricType in zvec/db/type.h) These are defined as uint32_t constants instead of C enums to ensure consistent binary representation across C and C++ boundaries.static final intenum zvec_error_code_tstatic final intstatic final intstatic final intstatic final intstatic final intQuantization type codes (must match zvec::QuantizeType in zvec/db/type.h) These are defined as uint32_t constants instead of C enums to ensure consistent binary representation across C and C++ boundaries. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic ZvecNative.zvec_string_tzvec_bin_create(byte[] data, long length) static ZvecNative.zvec_string_tzvec_bin_create(ByteBuffer data, long length) static ZvecNative.zvec_string_tzvec_bin_create(org.bytedeco.javacpp.BytePointer data, long length) Create binary-safe string from raw data Creates a new zvec_string_t from raw binary data that may contain null bytes.zvec_byte_array_create(long _capacity) Create a new mutable byte arraystatic voidDestroy byte array and free all associated memorystatic booleanzvec_check_version(int major, int minor, int patch) Check API version compatibility Check if the current library version meets the specified minimum version requirements Following semantic versioning specification: MAJOR.MINOR.PATCHstatic voidClear error statusstatic intzvec_collection_add_column(ZvecNative.zvec_collection_t collection, ZvecNative.zvec_field_schema_t field_schema, String expression) static intzvec_collection_add_column(ZvecNative.zvec_collection_t collection, ZvecNative.zvec_field_schema_t field_schema, org.bytedeco.javacpp.BytePointer expression) Add columnstatic intzvec_collection_alter_column(ZvecNative.zvec_collection_t collection, String column_name, String new_name, ZvecNative.zvec_field_schema_t new_schema) static intzvec_collection_alter_column(ZvecNative.zvec_collection_t collection, org.bytedeco.javacpp.BytePointer column_name, org.bytedeco.javacpp.BytePointer new_name, ZvecNative.zvec_field_schema_t new_schema) Alter columnstatic intzvec_collection_close(ZvecNative.zvec_collection_t collection) Close collection Only releases this handle; the collection itself closes once the last handle is released, waiting for any open iterators first.static intzvec_collection_create_and_open(String path, ZvecNative.zvec_collection_schema_t schema, ZvecNative.zvec_collection_options_t options, ZvecNative.zvec_collection_t collection) static intzvec_collection_create_and_open(org.bytedeco.javacpp.BytePointer path, ZvecNative.zvec_collection_schema_t schema, ZvecNative.zvec_collection_options_t options, org.bytedeco.javacpp.PointerPointer collection) Create and open collectionstatic intzvec_collection_create_and_open(org.bytedeco.javacpp.BytePointer path, ZvecNative.zvec_collection_schema_t schema, ZvecNative.zvec_collection_options_t options, ZvecNative.zvec_collection_t collection) static intzvec_collection_create_index(ZvecNative.zvec_collection_t collection, String field_name, ZvecNative.zvec_index_params_t index_params) static intzvec_collection_create_index(ZvecNative.zvec_collection_t collection, org.bytedeco.javacpp.BytePointer field_name, ZvecNative.zvec_index_params_t index_params) Create index for a collection fieldstatic intzvec_collection_create_iterator(ZvecNative.zvec_collection_t collection, ZvecNative.zvec_iterator_options_t options, org.bytedeco.javacpp.PointerPointer out_iter) Create a document iterator over the collection.static intzvec_collection_create_iterator(ZvecNative.zvec_collection_t collection, ZvecNative.zvec_iterator_options_t options, ZvecNative.zvec_doc_iterator_t out_iter) static intzvec_collection_delete(ZvecNative.zvec_collection_t collection, byte[] pks, long pk_count, org.bytedeco.javacpp.SizeTPointer success_count, org.bytedeco.javacpp.SizeTPointer error_count) static intzvec_collection_delete(ZvecNative.zvec_collection_t collection, ByteBuffer pks, long pk_count, org.bytedeco.javacpp.SizeTPointer success_count, org.bytedeco.javacpp.SizeTPointer error_count) static intzvec_collection_delete(ZvecNative.zvec_collection_t collection, org.bytedeco.javacpp.BytePointer pks, long pk_count, org.bytedeco.javacpp.SizeTPointer success_count, org.bytedeco.javacpp.SizeTPointer error_count) static intzvec_collection_delete(ZvecNative.zvec_collection_t collection, org.bytedeco.javacpp.PointerPointer pks, long pk_count, org.bytedeco.javacpp.SizeTPointer success_count, org.bytedeco.javacpp.SizeTPointer error_count) Delete documents from collectionstatic intzvec_collection_delete_by_filter(ZvecNative.zvec_collection_t collection, String filter) static intzvec_collection_delete_by_filter(ZvecNative.zvec_collection_t collection, org.bytedeco.javacpp.BytePointer filter) Delete documents by filter conditionstatic intzvec_collection_delete_with_results(ZvecNative.zvec_collection_t collection, byte[] pks, long pk_count, ZvecNative.zvec_write_result_t results, org.bytedeco.javacpp.SizeTPointer result_count) static intzvec_collection_delete_with_results(ZvecNative.zvec_collection_t collection, ByteBuffer pks, long pk_count, ZvecNative.zvec_write_result_t results, org.bytedeco.javacpp.SizeTPointer result_count) static intzvec_collection_delete_with_results(ZvecNative.zvec_collection_t collection, org.bytedeco.javacpp.BytePointer pks, long pk_count, ZvecNative.zvec_write_result_t results, org.bytedeco.javacpp.SizeTPointer result_count) static intzvec_collection_delete_with_results(ZvecNative.zvec_collection_t collection, org.bytedeco.javacpp.PointerPointer pks, long pk_count, org.bytedeco.javacpp.PointerPointer results, org.bytedeco.javacpp.SizeTPointer result_count) Delete documents by PK and return per-document statuses.static intzvec_collection_destroy(ZvecNative.zvec_collection_t collection) Destroy collectionstatic intzvec_collection_drop_column(ZvecNative.zvec_collection_t collection, String column_name) static intzvec_collection_drop_column(ZvecNative.zvec_collection_t collection, org.bytedeco.javacpp.BytePointer column_name) Drop columnstatic intzvec_collection_drop_index(ZvecNative.zvec_collection_t collection, String field_name) static intzvec_collection_drop_index(ZvecNative.zvec_collection_t collection, org.bytedeco.javacpp.BytePointer field_name) Drop indexstatic intzvec_collection_fetch(ZvecNative.zvec_collection_t collection, byte[] primary_keys, long count, byte[] output_fields, long output_field_count, boolean include_vector, org.bytedeco.javacpp.PointerPointer documents, org.bytedeco.javacpp.SizeTPointer found_count) static intzvec_collection_fetch(ZvecNative.zvec_collection_t collection, ByteBuffer primary_keys, long count, ByteBuffer output_fields, long output_field_count, boolean include_vector, org.bytedeco.javacpp.PointerPointer documents, org.bytedeco.javacpp.SizeTPointer found_count) static intzvec_collection_fetch(ZvecNative.zvec_collection_t collection, org.bytedeco.javacpp.BytePointer primary_keys, long count, org.bytedeco.javacpp.BytePointer output_fields, long output_field_count, boolean include_vector, org.bytedeco.javacpp.PointerPointer documents, org.bytedeco.javacpp.SizeTPointer found_count) static intzvec_collection_fetch(ZvecNative.zvec_collection_t collection, org.bytedeco.javacpp.PointerPointer primary_keys, long count, org.bytedeco.javacpp.PointerPointer output_fields, long output_field_count, boolean include_vector, org.bytedeco.javacpp.PointerPointer documents, org.bytedeco.javacpp.SizeTPointer found_count) Fetch documents by primary keysstatic intzvec_collection_flush(ZvecNative.zvec_collection_t collection) Flush collection data to diskstatic intzvec_collection_get_options(ZvecNative.zvec_collection_t collection, org.bytedeco.javacpp.PointerPointer options) Get collection optionsstatic intzvec_collection_get_options(ZvecNative.zvec_collection_t collection, ZvecNative.zvec_collection_options_t options) static intzvec_collection_get_schema(ZvecNative.zvec_collection_t collection, org.bytedeco.javacpp.PointerPointer schema) Get collection schemastatic intzvec_collection_get_schema(ZvecNative.zvec_collection_t collection, ZvecNative.zvec_collection_schema_t schema) static intzvec_collection_get_stats(ZvecNative.zvec_collection_t collection, org.bytedeco.javacpp.PointerPointer stats) Get collection statisticsstatic intzvec_collection_get_stats(ZvecNative.zvec_collection_t collection, ZvecNative.zvec_collection_stats_t stats) static intzvec_collection_insert(ZvecNative.zvec_collection_t collection, org.bytedeco.javacpp.PointerPointer docs, long doc_count, org.bytedeco.javacpp.SizeTPointer success_count, org.bytedeco.javacpp.SizeTPointer error_count) Insert documents into collectionstatic intzvec_collection_insert(ZvecNative.zvec_collection_t collection, ZvecNative.zvec_doc_t docs, long doc_count, org.bytedeco.javacpp.SizeTPointer success_count, org.bytedeco.javacpp.SizeTPointer error_count) static intzvec_collection_insert_with_results(ZvecNative.zvec_collection_t collection, org.bytedeco.javacpp.PointerPointer docs, long doc_count, org.bytedeco.javacpp.PointerPointer results, org.bytedeco.javacpp.SizeTPointer result_count) Insert documents and return per-document statuses.static intzvec_collection_insert_with_results(ZvecNative.zvec_collection_t collection, ZvecNative.zvec_doc_t docs, long doc_count, ZvecNative.zvec_write_result_t results, org.bytedeco.javacpp.SizeTPointer result_count) static intzvec_collection_multi_query(ZvecNative.zvec_collection_t collection, ZvecNative.zvec_multi_query_t query, org.bytedeco.javacpp.PointerPointer results, org.bytedeco.javacpp.SizeTPointer result_count) Multi-query with multiple sub-queries and re-rankingstatic intzvec_collection_open(String path, ZvecNative.zvec_collection_options_t options, ZvecNative.zvec_collection_t collection) static intzvec_collection_open(org.bytedeco.javacpp.BytePointer path, ZvecNative.zvec_collection_options_t options, org.bytedeco.javacpp.PointerPointer collection) Open existing collectionstatic intzvec_collection_open(org.bytedeco.javacpp.BytePointer path, ZvecNative.zvec_collection_options_t options, ZvecNative.zvec_collection_t collection) static intzvec_collection_optimize(ZvecNative.zvec_collection_t collection) Optimize collection (rebuild indexes, merge segments, etc.)Create collection optionsstatic voidDestroy collection optionsstatic booleanGet whether to enable memory mappingstatic longGet maximum buffer sizestatic booleanGet whether read-only modestatic intzvec_collection_options_set_enable_mmap(ZvecNative.zvec_collection_options_t options, boolean enable) Set whether to enable memory mappingstatic intzvec_collection_options_set_max_buffer_size(ZvecNative.zvec_collection_options_t options, long size) Set maximum buffer sizestatic intzvec_collection_options_set_read_only(ZvecNative.zvec_collection_options_t options, boolean read_only) Set whether read-only modestatic intzvec_collection_query(ZvecNative.zvec_collection_t collection, ZvecNative.zvec_vector_query_t query, org.bytedeco.javacpp.PointerPointer results, org.bytedeco.javacpp.SizeTPointer result_count) Vector similarity searchstatic intzvec_collection_schema_add_field(ZvecNative.zvec_collection_schema_t schema, ZvecNative.zvec_field_schema_t field) Add field to collection schemastatic intzvec_collection_schema_add_index(ZvecNative.zvec_collection_schema_t schema, String field_name, ZvecNative.zvec_index_params_t index_params) static intzvec_collection_schema_add_index(ZvecNative.zvec_collection_schema_t schema, org.bytedeco.javacpp.BytePointer field_name, ZvecNative.zvec_index_params_t index_params) Add index to fieldstatic intzvec_collection_schema_alter_field(ZvecNative.zvec_collection_schema_t schema, String field_name, ZvecNative.zvec_field_schema_t new_field) static intzvec_collection_schema_alter_field(ZvecNative.zvec_collection_schema_t schema, org.bytedeco.javacpp.BytePointer field_name, ZvecNative.zvec_field_schema_t new_field) Alter field schemazvec_collection_schema_create(org.bytedeco.javacpp.BytePointer name) Create collection schemastatic voidDestroy collection schemastatic intzvec_collection_schema_drop_field(ZvecNative.zvec_collection_schema_t schema, String field_name) static intzvec_collection_schema_drop_field(ZvecNative.zvec_collection_schema_t schema, org.bytedeco.javacpp.BytePointer field_name) Drop field from schemastatic intzvec_collection_schema_drop_index(ZvecNative.zvec_collection_schema_t schema, String field_name) static intzvec_collection_schema_drop_index(ZvecNative.zvec_collection_schema_t schema, org.bytedeco.javacpp.BytePointer field_name) Drop index from fieldstatic intzvec_collection_schema_get_all_field_names(ZvecNative.zvec_collection_schema_t schema, org.bytedeco.javacpp.PointerPointer names, org.bytedeco.javacpp.SizeTPointer count) Get all field nameszvec_collection_schema_get_field(ZvecNative.zvec_collection_schema_t schema, String field_name) zvec_collection_schema_get_field(ZvecNative.zvec_collection_schema_t schema, org.bytedeco.javacpp.BytePointer field_name) Get field by namezvec_collection_schema_get_forward_field(ZvecNative.zvec_collection_schema_t schema, String field_name) zvec_collection_schema_get_forward_field(ZvecNative.zvec_collection_schema_t schema, org.bytedeco.javacpp.BytePointer field_name) Get forward (scalar) field by namestatic intzvec_collection_schema_get_forward_field_names(ZvecNative.zvec_collection_schema_t schema, org.bytedeco.javacpp.PointerPointer names, org.bytedeco.javacpp.SizeTPointer count) Get all forward (scalar) field namesstatic intzvec_collection_schema_get_forward_field_names_with_index(ZvecNative.zvec_collection_schema_t schema, org.bytedeco.javacpp.PointerPointer names, org.bytedeco.javacpp.SizeTPointer count) Get all forward field names with indexstatic intzvec_collection_schema_get_forward_fields(ZvecNative.zvec_collection_schema_t schema, org.bytedeco.javacpp.PointerPointer fields, org.bytedeco.javacpp.SizeTPointer count) Get all forward (scalar) fieldsstatic intzvec_collection_schema_get_forward_fields_with_index(ZvecNative.zvec_collection_schema_t schema, org.bytedeco.javacpp.PointerPointer fields, org.bytedeco.javacpp.SizeTPointer count) Get all forward fields with indexstatic longGet maximum document count per segment of collection schemastatic org.bytedeco.javacpp.BytePointerGet collection schema namezvec_collection_schema_get_vector_field(ZvecNative.zvec_collection_schema_t schema, String field_name) zvec_collection_schema_get_vector_field(ZvecNative.zvec_collection_schema_t schema, org.bytedeco.javacpp.BytePointer field_name) Get vector field by namestatic intzvec_collection_schema_get_vector_fields(ZvecNative.zvec_collection_schema_t schema, org.bytedeco.javacpp.PointerPointer fields, org.bytedeco.javacpp.SizeTPointer count) Get all vector fieldsstatic booleanzvec_collection_schema_has_field(ZvecNative.zvec_collection_schema_t schema, String field_name) static booleanzvec_collection_schema_has_field(ZvecNative.zvec_collection_schema_t schema, org.bytedeco.javacpp.BytePointer field_name) Check if field exists in schemastatic booleanzvec_collection_schema_has_index(ZvecNative.zvec_collection_schema_t schema, String field_name) static booleanzvec_collection_schema_has_index(ZvecNative.zvec_collection_schema_t schema, org.bytedeco.javacpp.BytePointer field_name) Check if field has indexstatic intzvec_collection_schema_set_max_doc_count_per_segment(ZvecNative.zvec_collection_schema_t schema, long max_doc_count) Set maximum document count per segmentstatic intstatic intzvec_collection_schema_set_name(ZvecNative.zvec_collection_schema_t schema, org.bytedeco.javacpp.BytePointer name) Set collection schema namestatic intzvec_collection_schema_validate(ZvecNative.zvec_collection_schema_t schema, org.bytedeco.javacpp.PointerPointer error_msg) Validate collection schemastatic intzvec_collection_schema_validate(ZvecNative.zvec_collection_schema_t schema, ZvecNative.zvec_string_t error_msg) static voidDestroy collection statisticsstatic longGet document count from collection statsstatic floatzvec_collection_stats_get_index_completeness(ZvecNative.zvec_collection_stats_t stats, long index) Get index completeness at specified indexstatic longGet index count from collection statsstatic org.bytedeco.javacpp.BytePointerzvec_collection_stats_get_index_name(ZvecNative.zvec_collection_stats_t stats, long index) Get index name at specified indexstatic intzvec_collection_update(ZvecNative.zvec_collection_t collection, org.bytedeco.javacpp.PointerPointer docs, long doc_count, org.bytedeco.javacpp.SizeTPointer success_count, org.bytedeco.javacpp.SizeTPointer error_count) Update documents in collectionstatic intzvec_collection_update(ZvecNative.zvec_collection_t collection, ZvecNative.zvec_doc_t docs, long doc_count, org.bytedeco.javacpp.SizeTPointer success_count, org.bytedeco.javacpp.SizeTPointer error_count) static intzvec_collection_update_with_results(ZvecNative.zvec_collection_t collection, org.bytedeco.javacpp.PointerPointer docs, long doc_count, org.bytedeco.javacpp.PointerPointer results, org.bytedeco.javacpp.SizeTPointer result_count) Update documents and return per-document statuses.static intzvec_collection_update_with_results(ZvecNative.zvec_collection_t collection, ZvecNative.zvec_doc_t docs, long doc_count, ZvecNative.zvec_write_result_t results, org.bytedeco.javacpp.SizeTPointer result_count) static intzvec_collection_upsert(ZvecNative.zvec_collection_t collection, org.bytedeco.javacpp.PointerPointer docs, long doc_count, org.bytedeco.javacpp.SizeTPointer success_count, org.bytedeco.javacpp.SizeTPointer error_count) Insert or update documents in collection (upsert operation)static intzvec_collection_upsert(ZvecNative.zvec_collection_t collection, ZvecNative.zvec_doc_t docs, long doc_count, org.bytedeco.javacpp.SizeTPointer success_count, org.bytedeco.javacpp.SizeTPointer error_count) static intzvec_collection_upsert_with_results(ZvecNative.zvec_collection_t collection, org.bytedeco.javacpp.PointerPointer docs, long doc_count, org.bytedeco.javacpp.PointerPointer results, org.bytedeco.javacpp.SizeTPointer result_count) Upsert documents and return per-document statuses.static intzvec_collection_upsert_with_results(ZvecNative.zvec_collection_t collection, ZvecNative.zvec_doc_t docs, long doc_count, ZvecNative.zvec_write_result_t results, org.bytedeco.javacpp.SizeTPointer result_count) Create configuration datastatic voidDestroy configuration datastatic floatGet brute force by keys ratio from configuration datastatic floatGet FTS brute force by keys ratio from configuration datastatic floatGet invert to forward scan ratio from configuration datastatic org.bytedeco.javacpp.BytePointerGet jieba dict directory from configuration datastatic intGet log type from configuration datastatic longGet memory limit from configuration datastatic intGet optimize thread count from configuration datastatic intGet query thread count from configuration datastatic intzvec_config_data_set_brute_force_by_keys_ratio(ZvecNative.zvec_config_data_t config, float ratio) Set brute force by keys ratio in configuration datastatic intzvec_config_data_set_fts_brute_force_by_keys_ratio(ZvecNative.zvec_config_data_t config, float ratio) Set FTS brute force by keys ratio in configuration datastatic intzvec_config_data_set_invert_to_forward_scan_ratio(ZvecNative.zvec_config_data_t config, float ratio) Set invert to forward scan ratio in configuration datastatic intstatic intzvec_config_data_set_jieba_dict_dir(ZvecNative.zvec_config_data_t config, org.bytedeco.javacpp.BytePointer dir) Set jieba dict directory in configuration datastatic intzvec_config_data_set_log_config(ZvecNative.zvec_config_data_t config, ZvecNative.zvec_log_config_t log_config) Set log configuration in configuration datastatic intzvec_config_data_set_memory_limit(ZvecNative.zvec_config_data_t config, long memory_limit_bytes) Set memory limit in configuration datastatic intzvec_config_data_set_optimize_thread_count(ZvecNative.zvec_config_data_t config, int thread_count) Set optimize thread count in configuration datastatic intzvec_config_data_set_query_thread_count(ZvecNative.zvec_config_data_t config, int thread_count) Set query thread count in configuration datastatic ZvecNative.zvec_log_config_tzvec_config_log_create_console(int level) Create console log configurationstatic ZvecNative.zvec_log_config_tzvec_config_log_create_file(int level, String dir, String basename, int file_size, int overdue_days) static ZvecNative.zvec_log_config_tzvec_config_log_create_file(int level, org.bytedeco.javacpp.BytePointer dir, org.bytedeco.javacpp.BytePointer basename, int file_size, int overdue_days) Create file log configurationstatic voidDestroy log configurationstatic org.bytedeco.javacpp.BytePointerGet log file basename from file log configstatic org.bytedeco.javacpp.BytePointerGet log directory from file log configstatic intGet log file size from file log configstatic intGet log level from log configstatic intGet log overdue days from file log configstatic booleanCheck if log config is file typestatic intzvec_config_log_set_basename(ZvecNative.zvec_log_config_t config, String basename) static intzvec_config_log_set_basename(ZvecNative.zvec_log_config_t config, org.bytedeco.javacpp.BytePointer basename) Set log file basename in file log configstatic intzvec_config_log_set_dir(ZvecNative.zvec_log_config_t config, String dir) static intzvec_config_log_set_dir(ZvecNative.zvec_log_config_t config, org.bytedeco.javacpp.BytePointer dir) Set log directory in file log configstatic intzvec_config_log_set_file_size(ZvecNative.zvec_log_config_t config, int file_size) Set log file size in file log configstatic intzvec_config_log_set_level(ZvecNative.zvec_log_config_t config, int level) Set log level in log configstatic intzvec_config_log_set_overdue_days(ZvecNative.zvec_log_config_t config, int days) Set log overdue days in file log configstatic org.bytedeco.javacpp.BytePointerzvec_data_type_to_string(int data_type) Convert data type to stringstatic intAdd field to document by structurestatic intzvec_doc_add_field_by_value(ZvecNative.zvec_doc_t doc, String field_name, int data_type, org.bytedeco.javacpp.Pointer value, long value_size) static intzvec_doc_add_field_by_value(ZvecNative.zvec_doc_t doc, org.bytedeco.javacpp.BytePointer field_name, int data_type, org.bytedeco.javacpp.Pointer value, long value_size) Add field to document by valuestatic voidClear the document objectstatic ZvecNative.zvec_doc_tCreate a new document objectstatic intzvec_doc_deserialize(byte[] data, long size, ZvecNative.zvec_doc_t doc) static intzvec_doc_deserialize(ByteBuffer data, long size, ZvecNative.zvec_doc_t doc) static intzvec_doc_deserialize(org.bytedeco.javacpp.BytePointer data, long size, org.bytedeco.javacpp.PointerPointer doc) Deserialize documentstatic intzvec_doc_deserialize(org.bytedeco.javacpp.BytePointer data, long size, ZvecNative.zvec_doc_t doc) static voidDestroy the document object and release all resourcesstatic longGet document IDstatic longGet document field countstatic intzvec_doc_get_field_names(ZvecNative.zvec_doc_t doc, org.bytedeco.javacpp.PointerPointer field_names, org.bytedeco.javacpp.SizeTPointer count) Get all field names of documentstatic intzvec_doc_get_field_value_basic(ZvecNative.zvec_doc_t doc, String field_name, int field_type, org.bytedeco.javacpp.Pointer value_buffer, long buffer_size) static intzvec_doc_get_field_value_basic(ZvecNative.zvec_doc_t doc, org.bytedeco.javacpp.BytePointer field_name, int field_type, org.bytedeco.javacpp.Pointer value_buffer, long buffer_size) Get field value (basic type returned directly) Supports basic numeric data types: BOOL, INT32, INT64, UINT32, UINT64, FLOAT, DOUBLE.static intzvec_doc_get_field_value_copy(ZvecNative.zvec_doc_t doc, String field_name, int field_type, org.bytedeco.javacpp.Pointer value, org.bytedeco.javacpp.SizeTPointer value_size) static intzvec_doc_get_field_value_copy(ZvecNative.zvec_doc_t doc, org.bytedeco.javacpp.BytePointer field_name, int field_type, org.bytedeco.javacpp.PointerPointer value, org.bytedeco.javacpp.SizeTPointer value_size) Get field value copy (allocate new memory) Supports all data types including: - Basic types: BOOL, INT32, INT64, UINT32, UINT64, FLOAT, DOUBLE - String types: STRING, BINARY - Vector types: VECTOR_FP32, VECTOR_FP64, VECTOR_FP16, VECTOR_INT4, VECTOR_INT8, VECTOR_INT16, VECTOR_BINARY32, VECTOR_BINARY64 - Sparse vector types: SPARSE_VECTOR_FP32, SPARSE_VECTOR_FP16 - Array types: ARRAY_STRING, ARRAY_BINARY, ARRAY_BOOL, ARRAY_INT32, ARRAY_INT64, ARRAY_UINT32, ARRAY_UINT64, ARRAY_FLOAT, ARRAY_DOUBLE The returned value pointer must be manually freed using appropriate deallocation functions (zvec_free() for basic types and strings, zvec_free_uint8_array() for binary data).static intzvec_doc_get_field_value_copy(ZvecNative.zvec_doc_t doc, org.bytedeco.javacpp.BytePointer field_name, int field_type, org.bytedeco.javacpp.Pointer value, org.bytedeco.javacpp.SizeTPointer value_size) static intzvec_doc_get_field_value_pointer(ZvecNative.zvec_doc_t doc, String field_name, int field_type, org.bytedeco.javacpp.Pointer value, org.bytedeco.javacpp.SizeTPointer value_size) static intzvec_doc_get_field_value_pointer(ZvecNative.zvec_doc_t doc, org.bytedeco.javacpp.BytePointer field_name, int field_type, org.bytedeco.javacpp.PointerPointer value, org.bytedeco.javacpp.SizeTPointer value_size) Get field value pointer (data remains in document) Supports data types where direct pointer access is safe: - Basic types: BOOL, INT32, INT64, UINT32, UINT64, FLOAT, DOUBLE - String types: STRING (returns null-terminated C string), BINARY - Vector types: VECTOR_FP32, VECTOR_FP64, VECTOR_FP16, VECTOR_INT4, VECTOR_INT8, VECTOR_INT16, VECTOR_BINARY32, VECTOR_BINARY64 - Array types: ARRAY_INT32, ARRAY_INT64, ARRAY_UINT32, ARRAY_UINT64, ARRAY_FLOAT, ARRAY_DOUBLE The returned pointer points to data within the document object and does not require manual memory management.static intzvec_doc_get_field_value_pointer(ZvecNative.zvec_doc_t doc, org.bytedeco.javacpp.BytePointer field_name, int field_type, org.bytedeco.javacpp.Pointer value, org.bytedeco.javacpp.SizeTPointer value_size) static intGet document operatorstatic org.bytedeco.javacpp.BytePointerGet document primary key copy (needs manual release)static org.bytedeco.javacpp.BytePointerGet document primary key pointer (no copy)static floatGet document scorestatic booleanzvec_doc_has_field(ZvecNative.zvec_doc_t doc, String field_name) static booleanzvec_doc_has_field(ZvecNative.zvec_doc_t doc, org.bytedeco.javacpp.BytePointer field_name) Check if document contains specified fieldstatic booleanzvec_doc_has_field_value(ZvecNative.zvec_doc_t doc, String field_name) static booleanzvec_doc_has_field_value(ZvecNative.zvec_doc_t doc, org.bytedeco.javacpp.BytePointer field_name) Check if document field has valuestatic booleanCheck if document is emptystatic booleanzvec_doc_is_field_null(ZvecNative.zvec_doc_t doc, String field_name) static booleanzvec_doc_is_field_null(ZvecNative.zvec_doc_t doc, org.bytedeco.javacpp.BytePointer field_name) Check if document field is nullstatic voidClose the iterator and release all its resources.static intzvec_doc_iterator_next(ZvecNative.zvec_doc_iterator_t iter, org.bytedeco.javacpp.PointerPointer out_doc) Advance the iterator and return the next document.static intstatic longGet document memory usagestatic voidzvec_doc_merge(ZvecNative.zvec_doc_t doc, ZvecNative.zvec_doc_t other) Merge two documentsstatic intzvec_doc_remove_field(ZvecNative.zvec_doc_t doc, String field_name) static intzvec_doc_remove_field(ZvecNative.zvec_doc_t doc, org.bytedeco.javacpp.BytePointer field_name) Remove field from documentstatic intzvec_doc_serialize(ZvecNative.zvec_doc_t doc, byte[] data, org.bytedeco.javacpp.SizeTPointer size) static intzvec_doc_serialize(ZvecNative.zvec_doc_t doc, ByteBuffer data, org.bytedeco.javacpp.SizeTPointer size) static intzvec_doc_serialize(ZvecNative.zvec_doc_t doc, org.bytedeco.javacpp.BytePointer data, org.bytedeco.javacpp.SizeTPointer size) static intzvec_doc_serialize(ZvecNative.zvec_doc_t doc, org.bytedeco.javacpp.PointerPointer data, org.bytedeco.javacpp.SizeTPointer size) Serialize documentstatic voidzvec_doc_set_doc_id(ZvecNative.zvec_doc_t doc, long doc_id) Set document IDstatic intzvec_doc_set_field_null(ZvecNative.zvec_doc_t doc, String field_name) static intzvec_doc_set_field_null(ZvecNative.zvec_doc_t doc, org.bytedeco.javacpp.BytePointer field_name) Explicitly mark a document field as null.static voidzvec_doc_set_operator(ZvecNative.zvec_doc_t doc, int op) Set document operatorstatic voidzvec_doc_set_pk(ZvecNative.zvec_doc_t doc, String pk) static voidzvec_doc_set_pk(ZvecNative.zvec_doc_t doc, org.bytedeco.javacpp.BytePointer pk) Set document primary keystatic voidzvec_doc_set_score(ZvecNative.zvec_doc_t doc, float score) Set document scorestatic intzvec_doc_to_detail_string(ZvecNative.zvec_doc_t doc, byte[] detail_str) static intzvec_doc_to_detail_string(ZvecNative.zvec_doc_t doc, ByteBuffer detail_str) static intzvec_doc_to_detail_string(ZvecNative.zvec_doc_t doc, org.bytedeco.javacpp.BytePointer detail_str) static intzvec_doc_to_detail_string(ZvecNative.zvec_doc_t doc, org.bytedeco.javacpp.PointerPointer detail_str) Get detailed string representation of documentstatic voidzvec_docs_free(org.bytedeco.javacpp.PointerPointer documents, long count) Batch release document arraystatic voidzvec_docs_free(ZvecNative.zvec_doc_t documents, long count) static org.bytedeco.javacpp.BytePointerzvec_error_code_to_string(int error_code) Convert error code to description stringzvec_field_schema_create(String name, int data_type, boolean nullable, int dimension) zvec_field_schema_create(org.bytedeco.javacpp.BytePointer name, int data_type, boolean nullable, int dimension) Create field schemastatic voidDestroy field schemastatic intGet field data typestatic intGet field dimension (for vector fields)static longGet element data size for the fieldstatic intGet element data type for array fieldsGet index params of the field (returns pointer owned by the field schema, do not destroy.static intGet index type of the fieldstatic org.bytedeco.javacpp.BytePointerGet field namestatic booleanCheck if field has indexstatic booleanCheck if field has inverted index (for scalar fields)static booleanCheck if field is an array typestatic booleanCheck if field is a dense vector fieldstatic booleanCheck if field is nullablestatic booleanCheck if field is a sparse vector fieldstatic booleanCheck if field is a vector field (dense or sparse)static intzvec_field_schema_set_data_type(ZvecNative.zvec_field_schema_t schema, int data_type) Set field data typestatic intzvec_field_schema_set_dimension(ZvecNative.zvec_field_schema_t schema, int dimension) Set field dimension (for vector fields)static intzvec_field_schema_set_index_params(ZvecNative.zvec_field_schema_t schema, ZvecNative.zvec_index_params_t index_params) Set index parameters for fieldstatic intzvec_field_schema_set_name(ZvecNative.zvec_field_schema_t schema, String name) static intzvec_field_schema_set_name(ZvecNative.zvec_field_schema_t schema, org.bytedeco.javacpp.BytePointer name) Set field namestatic intzvec_field_schema_set_nullable(ZvecNative.zvec_field_schema_t schema, boolean nullable) Set field nullablestatic intzvec_field_schema_validate(ZvecNative.zvec_field_schema_t schema, org.bytedeco.javacpp.PointerPointer error_msg) Validate field schemastatic intzvec_field_schema_validate(ZvecNative.zvec_field_schema_t schema, ZvecNative.zvec_string_t error_msg) zvec_float_array_create(long count) Create a new float arraystatic voidDestroy float array and free all associated memorystatic voidzvec_free(org.bytedeco.javacpp.Pointer ptr) Free memory allocated by zvec_malloc or zvec library functions Use this function instead of free to ensure memory is managed consistently within the library.static voidzvec_free_field_schema(ZvecNative.zvec_field_schema_t field_schema) Free field schema memorystatic voidzvec_free_str_array(byte[] array, long count) static voidzvec_free_str_array(ByteBuffer array, long count) static voidzvec_free_str_array(org.bytedeco.javacpp.BytePointer array, long count) static voidzvec_free_str_array(org.bytedeco.javacpp.PointerPointer array, long count) Release string array memorystatic voidFree string memorystatic voidzvec_free_uint8_array(byte[] array) static voidzvec_free_uint8_array(ByteBuffer array) static voidzvec_free_uint8_array(org.bytedeco.javacpp.BytePointer array) Release uint8_t array memorystatic ZvecNative.zvec_fts_tCreate FTS query payloadstatic voidDestroy FTS query payloadstatic org.bytedeco.javacpp.BytePointerGet FTS match stringstatic org.bytedeco.javacpp.BytePointerGet FTS query expressionstatic intzvec_fts_set_match_string(ZvecNative.zvec_fts_t fts, String match_string) static intzvec_fts_set_match_string(ZvecNative.zvec_fts_t fts, org.bytedeco.javacpp.BytePointer match_string) Set FTS natural-language match stringstatic intzvec_fts_set_query_string(ZvecNative.zvec_fts_t fts, String query_string) static intzvec_fts_set_query_string(ZvecNative.zvec_fts_t fts, org.bytedeco.javacpp.BytePointer query_string) Set FTS boolean / advanced query expressionstatic org.bytedeco.javacpp.BytePointerGet the process-wide default jieba dict directory.static org.bytedeco.javacpp.BytePointerGet a human-readable description of the current I/O backend.static intGet the current I/O backend type for DiskAnn disk reads.static org.bytedeco.javacpp.BytePointerzvec_get_io_backend_type_name(int type) Get a human-readable name for the given I/O backend type.static intzvec_get_last_error(byte[] error_msg) static intzvec_get_last_error(ByteBuffer error_msg) static intzvec_get_last_error(org.bytedeco.javacpp.BytePointer error_msg) static intzvec_get_last_error(org.bytedeco.javacpp.PointerPointer error_msg) Get last error messagestatic intzvec_get_last_error_details(ZvecNative.zvec_error_details_t error_details) Get detailed information of the last errorstatic org.bytedeco.javacpp.BytePointerGet library version information Return format: "{base_version}[-{git_info}] (built {build_time})" Example: "0.3.0-g3f8a2b1 (built 2025-05-13 10:30:45)"static intGet major version numberstatic intGet minor version numberstatic intGet patch version numberCreate group by vector querystatic voidDestroy group by vector querystatic org.bytedeco.javacpp.BytePointerGet field namestatic org.bytedeco.javacpp.BytePointerGet filter expressionstatic org.bytedeco.javacpp.BytePointerGet group by field namestatic intGet group countstatic booleanGet whether to include vector data in resultsstatic intzvec_group_by_vector_query_get_output_fields(ZvecNative.zvec_group_by_vector_query_t query, org.bytedeco.javacpp.PointerPointer fields, org.bytedeco.javacpp.SizeTPointer count) Get output fieldsstatic intGet the maximum number of results per groupstatic intzvec_group_by_vector_query_set_diskann_params(ZvecNative.zvec_group_by_vector_query_t query, ZvecNative.zvec_diskann_query_params_t diskann_params) Set DiskANN query parameters (takes ownership)static intzvec_group_by_vector_query_set_field_name(ZvecNative.zvec_group_by_vector_query_t query, String field_name) static intzvec_group_by_vector_query_set_field_name(ZvecNative.zvec_group_by_vector_query_t query, org.bytedeco.javacpp.BytePointer field_name) Set field namestatic intstatic intzvec_group_by_vector_query_set_filter(ZvecNative.zvec_group_by_vector_query_t query, org.bytedeco.javacpp.BytePointer filter) Set filter expressionstatic intzvec_group_by_vector_query_set_flat_params(ZvecNative.zvec_group_by_vector_query_t query, ZvecNative.zvec_flat_query_params_t flat_params) Set Flat query parameters (takes ownership)static intzvec_group_by_vector_query_set_group_by_field_name(ZvecNative.zvec_group_by_vector_query_t query, String field_name) static intzvec_group_by_vector_query_set_group_by_field_name(ZvecNative.zvec_group_by_vector_query_t query, org.bytedeco.javacpp.BytePointer field_name) Set group by field namestatic intzvec_group_by_vector_query_set_group_count(ZvecNative.zvec_group_by_vector_query_t query, int count) Set group countstatic intzvec_group_by_vector_query_set_hnsw_params(ZvecNative.zvec_group_by_vector_query_t query, ZvecNative.zvec_hnsw_query_params_t hnsw_params) Set HNSW query parameters (takes ownership)static intzvec_group_by_vector_query_set_include_vector(ZvecNative.zvec_group_by_vector_query_t query, boolean include) Set whether to include vector data in resultsstatic intzvec_group_by_vector_query_set_ivf_params(ZvecNative.zvec_group_by_vector_query_t query, ZvecNative.zvec_ivf_query_params_t ivf_params) Set IVF query parameters (takes ownership)static intzvec_group_by_vector_query_set_ivf_rabitq_params(ZvecNative.zvec_group_by_vector_query_t query, ZvecNative.zvec_ivf_rabitq_query_params_t ivf_rabitq_params) Set IVF RaBitQ query parameters (takes ownership)static intzvec_group_by_vector_query_set_output_fields(ZvecNative.zvec_group_by_vector_query_t query, byte[] fields, long count) static intzvec_group_by_vector_query_set_output_fields(ZvecNative.zvec_group_by_vector_query_t query, ByteBuffer fields, long count) static intzvec_group_by_vector_query_set_output_fields(ZvecNative.zvec_group_by_vector_query_t query, org.bytedeco.javacpp.BytePointer fields, long count) static intzvec_group_by_vector_query_set_output_fields(ZvecNative.zvec_group_by_vector_query_t query, org.bytedeco.javacpp.PointerPointer fields, long count) Set output fieldsstatic intzvec_group_by_vector_query_set_query_params(ZvecNative.zvec_group_by_vector_query_t query, org.bytedeco.javacpp.Pointer params) Set query parameters (takes ownership)static intzvec_group_by_vector_query_set_query_vector(ZvecNative.zvec_group_by_vector_query_t query, org.bytedeco.javacpp.Pointer data, long size) Set query vector datastatic intzvec_group_by_vector_query_set_topk_per_group(ZvecNative.zvec_group_by_vector_query_t query, int topk_per_group) Set the maximum number of results per groupstatic intzvec_group_by_vector_query_set_vamana_params(ZvecNative.zvec_group_by_vector_query_t query, ZvecNative.zvec_vamana_query_params_t vamana_params) Set Vamana query parameters (takes ownership)zvec_index_params_create(int index_type) Create index parametersstatic voidDestroy index parametersstatic intGet DiskANN list_size parameterstatic intGet DiskANN max_degree parameterstatic intGet DiskANN pq_chunk_num parameterstatic intzvec_index_params_get_fts_params(ZvecNative.zvec_index_params_t params, byte[] out_tokenizer_name, ZvecNative.zvec_string_array_t out_filters, byte[] out_extra_params) static intzvec_index_params_get_fts_params(ZvecNative.zvec_index_params_t params, ByteBuffer out_tokenizer_name, ZvecNative.zvec_string_array_t out_filters, ByteBuffer out_extra_params) static intzvec_index_params_get_fts_params(ZvecNative.zvec_index_params_t params, org.bytedeco.javacpp.BytePointer out_tokenizer_name, ZvecNative.zvec_string_array_t out_filters, org.bytedeco.javacpp.BytePointer out_extra_params) static intzvec_index_params_get_fts_params(ZvecNative.zvec_index_params_t params, org.bytedeco.javacpp.PointerPointer out_tokenizer_name, org.bytedeco.javacpp.PointerPointer out_filters, org.bytedeco.javacpp.PointerPointer out_extra_params) Get FTS index parameters (all at once)static intGet HNSW ef_construction parameterstatic intGet HNSW m parameterstatic intzvec_index_params_get_invert_params(ZvecNative.zvec_index_params_t params, boolean[] out_enable_range_opt, boolean[] out_enable_wildcard) static intzvec_index_params_get_invert_params(ZvecNative.zvec_index_params_t params, org.bytedeco.javacpp.BoolPointer out_enable_range_opt, org.bytedeco.javacpp.BoolPointer out_enable_wildcard) Get invert index parameters (all at once)static intzvec_index_params_get_ivf_params(ZvecNative.zvec_index_params_t params, int[] out_n_list, int[] out_n_iters, boolean[] out_use_soar) static intzvec_index_params_get_ivf_params(ZvecNative.zvec_index_params_t params, int[] out_n_list, int[] out_n_iters, org.bytedeco.javacpp.BoolPointer out_use_soar) static intzvec_index_params_get_ivf_params(ZvecNative.zvec_index_params_t params, IntBuffer out_n_list, IntBuffer out_n_iters, boolean[] out_use_soar) static intzvec_index_params_get_ivf_params(ZvecNative.zvec_index_params_t params, IntBuffer out_n_list, IntBuffer out_n_iters, org.bytedeco.javacpp.BoolPointer out_use_soar) static intzvec_index_params_get_ivf_params(ZvecNative.zvec_index_params_t params, org.bytedeco.javacpp.IntPointer out_n_list, org.bytedeco.javacpp.IntPointer out_n_iters, boolean[] out_use_soar) static intzvec_index_params_get_ivf_params(ZvecNative.zvec_index_params_t params, org.bytedeco.javacpp.IntPointer out_n_list, org.bytedeco.javacpp.IntPointer out_n_iters, org.bytedeco.javacpp.BoolPointer out_use_soar) Get IVF parameters (all at once)static intzvec_index_params_get_ivf_rabitq_params(ZvecNative.zvec_index_params_t params, int[] out_nlist, int[] out_total_bits, int[] out_sample_count) static intzvec_index_params_get_ivf_rabitq_params(ZvecNative.zvec_index_params_t params, IntBuffer out_nlist, IntBuffer out_total_bits, IntBuffer out_sample_count) static intzvec_index_params_get_ivf_rabitq_params(ZvecNative.zvec_index_params_t params, org.bytedeco.javacpp.IntPointer out_nlist, org.bytedeco.javacpp.IntPointer out_total_bits, org.bytedeco.javacpp.IntPointer out_sample_count) Get IVF RaBitQ parameters (all at once)static intGet metric typestatic intGet quantize typestatic booleanGet enable_rotate setting from quantizer parametersstatic intGet index typestatic intzvec_index_params_get_vamana_params(ZvecNative.zvec_index_params_t params, int[] out_max_degree, int[] out_search_list_size, float[] out_alpha, boolean[] out_saturate_graph, boolean[] out_use_contiguous_memory) static intzvec_index_params_get_vamana_params(ZvecNative.zvec_index_params_t params, int[] out_max_degree, int[] out_search_list_size, float[] out_alpha, org.bytedeco.javacpp.BoolPointer out_saturate_graph, org.bytedeco.javacpp.BoolPointer out_use_contiguous_memory) static intzvec_index_params_get_vamana_params(ZvecNative.zvec_index_params_t params, IntBuffer out_max_degree, IntBuffer out_search_list_size, FloatBuffer out_alpha, boolean[] out_saturate_graph, boolean[] out_use_contiguous_memory) static intzvec_index_params_get_vamana_params(ZvecNative.zvec_index_params_t params, IntBuffer out_max_degree, IntBuffer out_search_list_size, FloatBuffer out_alpha, org.bytedeco.javacpp.BoolPointer out_saturate_graph, org.bytedeco.javacpp.BoolPointer out_use_contiguous_memory) static intzvec_index_params_get_vamana_params(ZvecNative.zvec_index_params_t params, org.bytedeco.javacpp.IntPointer out_max_degree, org.bytedeco.javacpp.IntPointer out_search_list_size, org.bytedeco.javacpp.FloatPointer out_alpha, boolean[] out_saturate_graph, boolean[] out_use_contiguous_memory) static intzvec_index_params_get_vamana_params(ZvecNative.zvec_index_params_t params, org.bytedeco.javacpp.IntPointer out_max_degree, org.bytedeco.javacpp.IntPointer out_search_list_size, org.bytedeco.javacpp.FloatPointer out_alpha, org.bytedeco.javacpp.BoolPointer out_saturate_graph, org.bytedeco.javacpp.BoolPointer out_use_contiguous_memory) Get Vamana parameters (all at once)static booleanGet whether Vamana two-pass graph construction is enabledstatic intzvec_index_params_set_diskann_params(ZvecNative.zvec_index_params_t params, int max_degree, int list_size, int pq_chunk_num) Set DiskANN specific parametersstatic intzvec_index_params_set_fts_params(ZvecNative.zvec_index_params_t params, String tokenizer_name, ZvecNative.zvec_string_array_t filters, String extra_params) static intzvec_index_params_set_fts_params(ZvecNative.zvec_index_params_t params, org.bytedeco.javacpp.BytePointer tokenizer_name, ZvecNative.zvec_string_array_t filters, org.bytedeco.javacpp.BytePointer extra_params) Set FTS index specific parametersstatic intzvec_index_params_set_hnsw_params(ZvecNative.zvec_index_params_t params, int m, int ef_construction) Set HNSW specific parametersstatic intzvec_index_params_set_invert_params(ZvecNative.zvec_index_params_t params, boolean enable_range_opt, boolean enable_wildcard) Set invert index specific parametersstatic intzvec_index_params_set_ivf_params(ZvecNative.zvec_index_params_t params, int n_list, int n_iters, boolean use_soar) Set IVF specific parametersstatic intzvec_index_params_set_ivf_rabitq_params(ZvecNative.zvec_index_params_t params, int nlist, int total_bits, int sample_count) Set IVF RaBitQ specific parametersstatic intzvec_index_params_set_metric_type(ZvecNative.zvec_index_params_t params, int metric_type) Set metric type (for vector indexes)static intzvec_index_params_set_quantize_type(ZvecNative.zvec_index_params_t params, int quantize_type) Set quantize type (for vector indexes)static intzvec_index_params_set_quantizer_enable_rotate(ZvecNative.zvec_index_params_t params, boolean enable_rotate) Set enable_rotate for quantizer (only effective with INT8/INT4 quantize type) When enabled, vectors are randomly rotated before INT8/INT4 quantization to reduce quantization error.static intzvec_index_params_set_vamana_params(ZvecNative.zvec_index_params_t params, int max_degree, int search_list_size, float alpha, boolean saturate_graph, boolean use_contiguous_memory) Set Vamana specific parametersstatic intzvec_index_params_set_vamana_two_pass_build(ZvecNative.zvec_index_params_t params, boolean two_pass_build) Enable or disable Vamana two-pass graph constructionstatic org.bytedeco.javacpp.BytePointerzvec_index_type_to_string(int index_type) Convert index type to stringstatic intInitialize ZVec libraryzvec_int64_array_create(long count) Create a new int64 arraystatic voidDestroy int64 array and free all associated memorystatic booleanCheck if library is initializedCreate an iterator options object with default values (output_fields = all, include_vector = true).static voidDestroy an iterator options object.static intzvec_iterator_options_set_include_vector(ZvecNative.zvec_iterator_options_t options, boolean include) Set whether to include vector fields in the returned documents.static intzvec_iterator_options_set_output_fields(ZvecNative.zvec_iterator_options_t options, byte[] output_fields, long count) static intzvec_iterator_options_set_output_fields(ZvecNative.zvec_iterator_options_t options, ByteBuffer output_fields, long count) static intzvec_iterator_options_set_output_fields(ZvecNative.zvec_iterator_options_t options, org.bytedeco.javacpp.BytePointer output_fields, long count) static intzvec_iterator_options_set_output_fields(ZvecNative.zvec_iterator_options_t options, org.bytedeco.javacpp.PointerPointer output_fields, long count) Set the scalar fields to return.static org.bytedeco.javacpp.Pointerzvec_malloc(long size) Allocate memory within the zvec library Use this function instead of malloc to ensure memory is managed consistently within the library.static org.bytedeco.javacpp.BytePointerzvec_metric_type_to_string(int metric_type) Convert metric type to stringstatic intzvec_multi_query_add_sub_query(ZvecNative.zvec_multi_query_t query, ZvecNative.zvec_sub_query_t sub_query) Add a sub-query to the multi-query queryCreate multi-query querystatic voidDestroy multi-query querystatic org.bytedeco.javacpp.BytePointerGet filter expressionstatic booleanGet whether to include vector data in resultsstatic intzvec_multi_query_get_output_fields(ZvecNative.zvec_multi_query_t query, org.bytedeco.javacpp.PointerPointer fields, org.bytedeco.javacpp.SizeTPointer count) Get output fieldsstatic longGet number of sub-queriesstatic intGet topkstatic intzvec_multi_query_set_filter(ZvecNative.zvec_multi_query_t query, String filter) static intzvec_multi_query_set_filter(ZvecNative.zvec_multi_query_t query, org.bytedeco.javacpp.BytePointer filter) Set filter expressionstatic intzvec_multi_query_set_include_vector(ZvecNative.zvec_multi_query_t query, boolean include) Set whether to include vector data in resultsstatic intzvec_multi_query_set_output_fields(ZvecNative.zvec_multi_query_t query, byte[] fields, long count) static intzvec_multi_query_set_output_fields(ZvecNative.zvec_multi_query_t query, ByteBuffer fields, long count) static intzvec_multi_query_set_output_fields(ZvecNative.zvec_multi_query_t query, org.bytedeco.javacpp.BytePointer fields, long count) static intzvec_multi_query_set_output_fields(ZvecNative.zvec_multi_query_t query, org.bytedeco.javacpp.PointerPointer fields, long count) Set output fieldsstatic intzvec_multi_query_set_rerank_rrf(ZvecNative.zvec_multi_query_t query, int rank_constant) Set RRF rerank strategy on a multi-query.static intzvec_multi_query_set_rerank_weighted(ZvecNative.zvec_multi_query_t query, double[] weights, long weight_count) static intzvec_multi_query_set_rerank_weighted(ZvecNative.zvec_multi_query_t query, DoubleBuffer weights, long weight_count) static intzvec_multi_query_set_rerank_weighted(ZvecNative.zvec_multi_query_t query, org.bytedeco.javacpp.DoublePointer weights, long weight_count) Set Weighted rerank strategy on a multi-query.static intzvec_multi_query_set_topk(ZvecNative.zvec_multi_query_t query, int topk) Set topkzvec_query_params_diskann_create(int list_size) Create DiskANN query parametersstatic voidDestroy DiskANN query parametersstatic booleanGet linear search mode (common parameter from QueryParams base)static booleanGet whether to use refiner (common parameter from QueryParams base)static intGet search frontier sizestatic floatGet search radius (common parameter from QueryParams base)static intzvec_query_params_diskann_set_is_linear(ZvecNative.zvec_diskann_query_params_t params, boolean is_linear) Set linear search mode (common parameter from QueryParams base)static intzvec_query_params_diskann_set_is_using_refiner(ZvecNative.zvec_diskann_query_params_t params, boolean is_using_refiner) Set whether to use refiner (common parameter from QueryParams base)static intzvec_query_params_diskann_set_list_size(ZvecNative.zvec_diskann_query_params_t params, int list_size) Set search frontier sizestatic intzvec_query_params_diskann_set_radius(ZvecNative.zvec_diskann_query_params_t params, float radius) Set search radius (common parameter from QueryParams base)zvec_query_params_flat_create(boolean is_using_refiner, float scale_factor) Create Flat query parametersstatic voidDestroy Flat query parametersstatic booleanGet linear search mode (common parameter from QueryParams base)static booleanGet whether to use refiner (common parameter from QueryParams base)static floatGet search radius (common parameter from QueryParams base)static floatGet scale factorstatic intzvec_query_params_flat_set_is_linear(ZvecNative.zvec_flat_query_params_t params, boolean is_linear) Set linear search mode (common parameter from QueryParams base)static intzvec_query_params_flat_set_is_using_refiner(ZvecNative.zvec_flat_query_params_t params, boolean is_using_refiner) Set whether to use refiner (common parameter from QueryParams base)static intzvec_query_params_flat_set_radius(ZvecNative.zvec_flat_query_params_t params, float radius) Set search radius (common parameter from QueryParams base)static intzvec_query_params_flat_set_scale_factor(ZvecNative.zvec_flat_query_params_t params, float scale_factor) Set scale factorzvec_query_params_fts_create(String default_operator) zvec_query_params_fts_create(org.bytedeco.javacpp.BytePointer default_operator) Create FTS query parametersstatic voidDestroy FTS query parametersstatic org.bytedeco.javacpp.BytePointerGet default boolean operatorstatic intzvec_query_params_fts_set_default_operator(ZvecNative.zvec_fts_query_params_t params, String default_operator) static intzvec_query_params_fts_set_default_operator(ZvecNative.zvec_fts_query_params_t params, org.bytedeco.javacpp.BytePointer default_operator) Set default boolean operatorzvec_query_params_hnsw_create(int ef, float radius, boolean is_linear, boolean is_using_refiner) Create HNSW query parametersstatic voidDestroy HNSW query parametersstatic intGet exploration factorstatic booleanGet linear search mode (common parameter from QueryParams base)static booleanGet whether to use refiner (common parameter from QueryParams base)static floatGet search radius (common parameter from QueryParams base)static intzvec_query_params_hnsw_set_ef(ZvecNative.zvec_hnsw_query_params_t params, int ef) Set exploration factorstatic intzvec_query_params_hnsw_set_is_linear(ZvecNative.zvec_hnsw_query_params_t params, boolean is_linear) Set linear search mode (common parameter from QueryParams base)static intzvec_query_params_hnsw_set_is_using_refiner(ZvecNative.zvec_hnsw_query_params_t params, boolean is_using_refiner) Set whether to use refiner (common parameter from QueryParams base)static intzvec_query_params_hnsw_set_radius(ZvecNative.zvec_hnsw_query_params_t params, float radius) Set search radius (common parameter from QueryParams base)zvec_query_params_ivf_create(int nprobe, boolean is_using_refiner, float scale_factor) Create IVF query parametersstatic voidDestroy IVF query parametersstatic booleanGet linear search mode (common parameter from QueryParams base)static booleanGet whether to use refiner (common parameter from QueryParams base)static intGet number of probe clustersstatic floatGet search radius (common parameter from QueryParams base)static floatGet scale factorzvec_query_params_ivf_rabitq_create(int nprobe, float radius, boolean is_linear, boolean is_using_refiner) Create IVF RaBitQ query parametersstatic voidDestroy IVF RaBitQ query parametersstatic booleanGet linear search modestatic booleanGet whether to use refinerstatic intGet number of probe clustersstatic floatGet search radiusstatic floatGet candidate expansion factor used by the refinerstatic intzvec_query_params_ivf_rabitq_set_is_linear(ZvecNative.zvec_ivf_rabitq_query_params_t params, boolean is_linear) Set linear search modestatic intzvec_query_params_ivf_rabitq_set_is_using_refiner(ZvecNative.zvec_ivf_rabitq_query_params_t params, boolean is_using_refiner) Set whether to use refinerstatic intzvec_query_params_ivf_rabitq_set_nprobe(ZvecNative.zvec_ivf_rabitq_query_params_t params, int nprobe) Set number of probe clustersstatic intzvec_query_params_ivf_rabitq_set_radius(ZvecNative.zvec_ivf_rabitq_query_params_t params, float radius) Set search radiusstatic intzvec_query_params_ivf_rabitq_set_scale_factor(ZvecNative.zvec_ivf_rabitq_query_params_t params, float scale_factor) Set candidate expansion factor used by the refinerstatic intzvec_query_params_ivf_set_is_linear(ZvecNative.zvec_ivf_query_params_t params, boolean is_linear) Set linear search mode (common parameter from QueryParams base)static intzvec_query_params_ivf_set_is_using_refiner(ZvecNative.zvec_ivf_query_params_t params, boolean is_using_refiner) Set whether to use refiner (common parameter from QueryParams base)static intzvec_query_params_ivf_set_nprobe(ZvecNative.zvec_ivf_query_params_t params, int nprobe) Set number of probe clustersstatic intzvec_query_params_ivf_set_radius(ZvecNative.zvec_ivf_query_params_t params, float radius) Set search radius (common parameter from QueryParams base)static intzvec_query_params_ivf_set_scale_factor(ZvecNative.zvec_ivf_query_params_t params, float scale_factor) Set scale factorzvec_query_params_vamana_create(int ef_search, float radius, boolean is_linear, boolean is_using_refiner) Create Vamana query parametersstatic voidDestroy Vamana query parametersstatic intGet search-time candidate list sizestatic booleanGet linear search modestatic booleanGet whether to use refinerstatic floatGet search radiusstatic intzvec_query_params_vamana_set_ef_search(ZvecNative.zvec_vamana_query_params_t params, int ef_search) Set search-time candidate list sizestatic intzvec_query_params_vamana_set_is_linear(ZvecNative.zvec_vamana_query_params_t params, boolean is_linear) Set linear search modestatic intzvec_query_params_vamana_set_is_using_refiner(ZvecNative.zvec_vamana_query_params_t params, boolean is_using_refiner) Set whether to use refinerstatic intzvec_query_params_vamana_set_radius(ZvecNative.zvec_vamana_query_params_t params, float radius) Set search radiusstatic voidstatic voidzvec_set_default_jieba_dict_dir(org.bytedeco.javacpp.BytePointer dir) Set the process-wide default jieba dict directory.static intClean up ZVec library resourcesstatic voidzvec_string_array_add(ZvecNative.zvec_string_array_t array, long idx, String str) static voidzvec_string_array_add(ZvecNative.zvec_string_array_t array, long idx, org.bytedeco.javacpp.BytePointer str) Add a string to the string array at specified indexzvec_string_array_create(long count) Create a new string arraystatic voidDestroy string array and free all associated memorystatic org.bytedeco.javacpp.BytePointerGet C string from zvec_string_tstatic intCompare two stringsstatic ZvecNative.zvec_string_tCopy string Creates a new zvec_string_t by copying an existing string.static ZvecNative.zvec_string_tzvec_string_create(String str) static ZvecNative.zvec_string_tzvec_string_create(org.bytedeco.javacpp.BytePointer str) Create string from C stringstatic ZvecNative.zvec_string_tCreate string from string view Creates a new zvec_string_t by copying data from a zvec_string_view_t.static longGet string lengthstatic ZvecNative.zvec_sub_query_tCreate sub-querystatic voidDestroy sub-querystatic org.bytedeco.javacpp.BytePointerGet field namestatic intGet number of candidatesstatic intzvec_sub_query_set_diskann_params(ZvecNative.zvec_sub_query_t query, ZvecNative.zvec_diskann_query_params_t diskann_params) Set DiskANN query parameters (takes ownership)static intzvec_sub_query_set_field_name(ZvecNative.zvec_sub_query_t query, String field_name) static intzvec_sub_query_set_field_name(ZvecNative.zvec_sub_query_t query, org.bytedeco.javacpp.BytePointer field_name) Set field namestatic intzvec_sub_query_set_flat_params(ZvecNative.zvec_sub_query_t query, ZvecNative.zvec_flat_query_params_t flat_params) Set Flat query parameters (takes ownership)static intSet FTS clause on a sub-query (copies the FTS clause)static intzvec_sub_query_set_fts_params(ZvecNative.zvec_sub_query_t query, ZvecNative.zvec_fts_query_params_t fts_params) Set FTS query parameters on a sub-query (takes ownership)static intzvec_sub_query_set_hnsw_params(ZvecNative.zvec_sub_query_t query, ZvecNative.zvec_hnsw_query_params_t hnsw_params) Set HNSW query parameters (takes ownership)static intzvec_sub_query_set_ivf_params(ZvecNative.zvec_sub_query_t query, ZvecNative.zvec_ivf_query_params_t ivf_params) Set IVF query parameters (takes ownership)static intzvec_sub_query_set_ivf_rabitq_params(ZvecNative.zvec_sub_query_t query, ZvecNative.zvec_ivf_rabitq_query_params_t ivf_rabitq_params) Set IVF RaBitQ query parameters (takes ownership)static intzvec_sub_query_set_num_candidates(ZvecNative.zvec_sub_query_t query, int num_candidates) Set number of candidates to retrieve per fieldstatic intzvec_sub_query_set_query_vector(ZvecNative.zvec_sub_query_t query, org.bytedeco.javacpp.Pointer data, long size) Set query vector datastatic intzvec_sub_query_set_sparse_indices(ZvecNative.zvec_sub_query_t query, int[] indices, long count) static intzvec_sub_query_set_sparse_indices(ZvecNative.zvec_sub_query_t query, IntBuffer indices, long count) static intzvec_sub_query_set_sparse_indices(ZvecNative.zvec_sub_query_t query, org.bytedeco.javacpp.IntPointer indices, long count) Set sparse vector indicesstatic intzvec_sub_query_set_sparse_values(ZvecNative.zvec_sub_query_t query, float[] values, long count) static intzvec_sub_query_set_sparse_values(ZvecNative.zvec_sub_query_t query, FloatBuffer values, long count) static intzvec_sub_query_set_sparse_values(ZvecNative.zvec_sub_query_t query, org.bytedeco.javacpp.FloatPointer values, long count) Set sparse vector valuesstatic intzvec_sub_query_set_sparse_vector(ZvecNative.zvec_sub_query_t query, int[] indices, float[] values, long count) static intzvec_sub_query_set_sparse_vector(ZvecNative.zvec_sub_query_t query, IntBuffer indices, FloatBuffer values, long count) static intzvec_sub_query_set_sparse_vector(ZvecNative.zvec_sub_query_t query, org.bytedeco.javacpp.IntPointer indices, org.bytedeco.javacpp.FloatPointer values, long count) Set sparse vector indices and valuesstatic intzvec_sub_query_set_vamana_params(ZvecNative.zvec_sub_query_t query, ZvecNative.zvec_vamana_query_params_t vamana_params) Set Vamana query parameters (takes ownership)Create vector querystatic voidDestroy vector querystatic org.bytedeco.javacpp.BytePointerGet field namestatic org.bytedeco.javacpp.BytePointerGet filter expressionstatic ZvecNative.zvec_fts_tGet FTS payload attached to a vector querystatic booleanGet whether to include doc ID in resultsstatic booleanGet whether to include vector data in resultsstatic intzvec_vector_query_get_output_fields(ZvecNative.zvec_vector_query_t query, org.bytedeco.javacpp.PointerPointer fields, org.bytedeco.javacpp.SizeTPointer count) Get output fieldsstatic intGet topkstatic intzvec_vector_query_set_diskann_params(ZvecNative.zvec_vector_query_t query, ZvecNative.zvec_diskann_query_params_t diskann_params) Set DiskANN query parameters (takes ownership)static intzvec_vector_query_set_field_name(ZvecNative.zvec_vector_query_t query, String field_name) static intzvec_vector_query_set_field_name(ZvecNative.zvec_vector_query_t query, org.bytedeco.javacpp.BytePointer field_name) Set field namestatic intzvec_vector_query_set_filter(ZvecNative.zvec_vector_query_t query, String filter) static intzvec_vector_query_set_filter(ZvecNative.zvec_vector_query_t query, org.bytedeco.javacpp.BytePointer filter) Set filter expressionstatic intzvec_vector_query_set_flat_params(ZvecNative.zvec_vector_query_t query, ZvecNative.zvec_flat_query_params_t flat_params) Set Flat query parameters (takes ownership)static intSet FTS payload on a vector query (payload is copied)static intzvec_vector_query_set_fts_params(ZvecNative.zvec_vector_query_t query, ZvecNative.zvec_fts_query_params_t fts_params) Set FTS query parameters (takes ownership)static intzvec_vector_query_set_hnsw_params(ZvecNative.zvec_vector_query_t query, ZvecNative.zvec_hnsw_query_params_t hnsw_params) Set HNSW query parameters (takes ownership)static intzvec_vector_query_set_include_doc_id(ZvecNative.zvec_vector_query_t query, boolean include) Set whether to include doc ID in resultsstatic intzvec_vector_query_set_include_vector(ZvecNative.zvec_vector_query_t query, boolean include) Set whether to include vector data in resultsstatic intzvec_vector_query_set_ivf_params(ZvecNative.zvec_vector_query_t query, ZvecNative.zvec_ivf_query_params_t ivf_params) Set IVF query parameters (takes ownership)static intzvec_vector_query_set_ivf_rabitq_params(ZvecNative.zvec_vector_query_t query, ZvecNative.zvec_ivf_rabitq_query_params_t ivf_rabitq_params) Set IVF RaBitQ query parameters (takes ownership)static intzvec_vector_query_set_output_fields(ZvecNative.zvec_vector_query_t query, byte[] fields, long count) static intzvec_vector_query_set_output_fields(ZvecNative.zvec_vector_query_t query, ByteBuffer fields, long count) static intzvec_vector_query_set_output_fields(ZvecNative.zvec_vector_query_t query, org.bytedeco.javacpp.BytePointer fields, long count) static intzvec_vector_query_set_output_fields(ZvecNative.zvec_vector_query_t query, org.bytedeco.javacpp.PointerPointer fields, long count) Set output fieldsstatic intzvec_vector_query_set_query_params(ZvecNative.zvec_vector_query_t query, org.bytedeco.javacpp.Pointer params) Set query parameters (takes ownership)static intzvec_vector_query_set_query_vector(ZvecNative.zvec_vector_query_t query, org.bytedeco.javacpp.Pointer data, long size) Set query vector datastatic intzvec_vector_query_set_topk(ZvecNative.zvec_vector_query_t query, int topk) Set topk (number of results to return)static intzvec_vector_query_set_vamana_params(ZvecNative.zvec_vector_query_t query, ZvecNative.zvec_vamana_query_params_t vamana_params) Set Vamana query parameters for vector querystatic voidzvec_write_results_free(ZvecNative.zvec_write_result_t results, long result_count) Free result arrays returned by detailed DML APIs.Methods inherited from class org.zvec.binding.presets.ZvecConfig
map
-
Field Details
-
ZVEC_OK
public static final int ZVEC_OKenum zvec_error_code_t- See Also:
-
ZVEC_ERROR_NOT_FOUND
public static final int ZVEC_ERROR_NOT_FOUNDenum zvec_error_code_t- See Also:
-
ZVEC_ERROR_ALREADY_EXISTS
public static final int ZVEC_ERROR_ALREADY_EXISTSenum zvec_error_code_t- See Also:
-
ZVEC_ERROR_INVALID_ARGUMENT
public static final int ZVEC_ERROR_INVALID_ARGUMENTenum zvec_error_code_t- See Also:
-
ZVEC_ERROR_PERMISSION_DENIED
public static final int ZVEC_ERROR_PERMISSION_DENIEDenum zvec_error_code_t- See Also:
-
ZVEC_ERROR_FAILED_PRECONDITION
public static final int ZVEC_ERROR_FAILED_PRECONDITIONenum zvec_error_code_t- See Also:
-
ZVEC_ERROR_RESOURCE_EXHAUSTED
public static final int ZVEC_ERROR_RESOURCE_EXHAUSTEDenum zvec_error_code_t- See Also:
-
ZVEC_ERROR_UNAVAILABLE
public static final int ZVEC_ERROR_UNAVAILABLEenum zvec_error_code_t- See Also:
-
ZVEC_ERROR_INTERNAL_ERROR
public static final int ZVEC_ERROR_INTERNAL_ERRORenum zvec_error_code_t- See Also:
-
ZVEC_ERROR_NOT_SUPPORTED
public static final int ZVEC_ERROR_NOT_SUPPORTEDenum zvec_error_code_t- See Also:
-
ZVEC_ERROR_UNKNOWN
public static final int ZVEC_ERROR_UNKNOWNenum zvec_error_code_t- See Also:
-
ZVEC_LOG_LEVEL_DEBUG
public static final int ZVEC_LOG_LEVEL_DEBUGenum zvec_log_level_t- See Also:
-
ZVEC_LOG_LEVEL_INFO
public static final int ZVEC_LOG_LEVEL_INFOenum zvec_log_level_t- See Also:
-
ZVEC_LOG_LEVEL_WARN
public static final int ZVEC_LOG_LEVEL_WARNenum zvec_log_level_t- See Also:
-
ZVEC_LOG_LEVEL_ERROR
public static final int ZVEC_LOG_LEVEL_ERRORenum zvec_log_level_t- See Also:
-
ZVEC_LOG_LEVEL_FATAL
public static final int ZVEC_LOG_LEVEL_FATALenum zvec_log_level_t- See Also:
-
ZVEC_LOG_TYPE_CONSOLE
public static final int ZVEC_LOG_TYPE_CONSOLEenum zvec_log_type_t- See Also:
-
ZVEC_LOG_TYPE_FILE
public static final int ZVEC_LOG_TYPE_FILEenum zvec_log_type_t- See Also:
-
ZVEC_IO_BACKEND_TYPE_PREAD
public static final int ZVEC_IO_BACKEND_TYPE_PREADSynchronous pread(); no async I/O- See Also:
-
ZVEC_IO_BACKEND_TYPE_LIBAIO
public static final int ZVEC_IO_BACKEND_TYPE_LIBAIOlibaio loaded at runtime via dlopen()- See Also:
-
ZVEC_IO_BACKEND_TYPE_IO_URING
public static final int ZVEC_IO_BACKEND_TYPE_IO_URINGio_uring via raw kernel syscalls (zero dependency)- See Also:
-
ZVEC_DATA_TYPE_UNDEFINED
public static final int ZVEC_DATA_TYPE_UNDEFINEDData type codes (must match zvec::DataType in zvec/db/type.h) These are defined as uint32_t constants instead of C enums to ensure consistent binary representation across C and C++ boundaries.- See Also:
-
ZVEC_DATA_TYPE_BINARY
public static final int ZVEC_DATA_TYPE_BINARY- See Also:
-
ZVEC_DATA_TYPE_STRING
public static final int ZVEC_DATA_TYPE_STRING- See Also:
-
ZVEC_DATA_TYPE_BOOL
public static final int ZVEC_DATA_TYPE_BOOL- See Also:
-
ZVEC_DATA_TYPE_INT32
public static final int ZVEC_DATA_TYPE_INT32- See Also:
-
ZVEC_DATA_TYPE_INT64
public static final int ZVEC_DATA_TYPE_INT64- See Also:
-
ZVEC_DATA_TYPE_UINT32
public static final int ZVEC_DATA_TYPE_UINT32- See Also:
-
ZVEC_DATA_TYPE_UINT64
public static final int ZVEC_DATA_TYPE_UINT64- See Also:
-
ZVEC_DATA_TYPE_FLOAT
public static final int ZVEC_DATA_TYPE_FLOAT- See Also:
-
ZVEC_DATA_TYPE_DOUBLE
public static final int ZVEC_DATA_TYPE_DOUBLE- See Also:
-
ZVEC_DATA_TYPE_VECTOR_BINARY32
public static final int ZVEC_DATA_TYPE_VECTOR_BINARY32- See Also:
-
ZVEC_DATA_TYPE_VECTOR_BINARY64
public static final int ZVEC_DATA_TYPE_VECTOR_BINARY64- See Also:
-
ZVEC_DATA_TYPE_VECTOR_FP16
public static final int ZVEC_DATA_TYPE_VECTOR_FP16- See Also:
-
ZVEC_DATA_TYPE_VECTOR_FP32
public static final int ZVEC_DATA_TYPE_VECTOR_FP32- See Also:
-
ZVEC_DATA_TYPE_VECTOR_FP64
public static final int ZVEC_DATA_TYPE_VECTOR_FP64- See Also:
-
ZVEC_DATA_TYPE_VECTOR_INT4
public static final int ZVEC_DATA_TYPE_VECTOR_INT4- See Also:
-
ZVEC_DATA_TYPE_VECTOR_INT8
public static final int ZVEC_DATA_TYPE_VECTOR_INT8- See Also:
-
ZVEC_DATA_TYPE_VECTOR_INT16
public static final int ZVEC_DATA_TYPE_VECTOR_INT16- See Also:
-
ZVEC_DATA_TYPE_SPARSE_VECTOR_FP16
public static final int ZVEC_DATA_TYPE_SPARSE_VECTOR_FP16- See Also:
-
ZVEC_DATA_TYPE_SPARSE_VECTOR_FP32
public static final int ZVEC_DATA_TYPE_SPARSE_VECTOR_FP32- See Also:
-
ZVEC_DATA_TYPE_ARRAY_BINARY
public static final int ZVEC_DATA_TYPE_ARRAY_BINARY- See Also:
-
ZVEC_DATA_TYPE_ARRAY_STRING
public static final int ZVEC_DATA_TYPE_ARRAY_STRING- See Also:
-
ZVEC_DATA_TYPE_ARRAY_BOOL
public static final int ZVEC_DATA_TYPE_ARRAY_BOOL- See Also:
-
ZVEC_DATA_TYPE_ARRAY_INT32
public static final int ZVEC_DATA_TYPE_ARRAY_INT32- See Also:
-
ZVEC_DATA_TYPE_ARRAY_INT64
public static final int ZVEC_DATA_TYPE_ARRAY_INT64- See Also:
-
ZVEC_DATA_TYPE_ARRAY_UINT32
public static final int ZVEC_DATA_TYPE_ARRAY_UINT32- See Also:
-
ZVEC_DATA_TYPE_ARRAY_UINT64
public static final int ZVEC_DATA_TYPE_ARRAY_UINT64- See Also:
-
ZVEC_DATA_TYPE_ARRAY_FLOAT
public static final int ZVEC_DATA_TYPE_ARRAY_FLOAT- See Also:
-
ZVEC_DATA_TYPE_ARRAY_DOUBLE
public static final int ZVEC_DATA_TYPE_ARRAY_DOUBLE- See Also:
-
ZVEC_INDEX_TYPE_UNDEFINED
public static final int ZVEC_INDEX_TYPE_UNDEFINEDIndex type codes (must match zvec::IndexType in zvec/db/type.h) These are defined as uint32_t constants instead of C enums to ensure consistent binary representation across C and C++ boundaries.- See Also:
-
ZVEC_INDEX_TYPE_HNSW
public static final int ZVEC_INDEX_TYPE_HNSW- See Also:
-
ZVEC_INDEX_TYPE_IVF
public static final int ZVEC_INDEX_TYPE_IVF- See Also:
-
ZVEC_INDEX_TYPE_FLAT
public static final int ZVEC_INDEX_TYPE_FLAT- See Also:
-
ZVEC_INDEX_TYPE_HNSW_RABITQ
public static final int ZVEC_INDEX_TYPE_HNSW_RABITQ- See Also:
-
ZVEC_INDEX_TYPE_DISKANN
public static final int ZVEC_INDEX_TYPE_DISKANN- See Also:
-
ZVEC_INDEX_TYPE_VAMANA
public static final int ZVEC_INDEX_TYPE_VAMANA- See Also:
-
ZVEC_INDEX_TYPE_IVF_RABITQ
public static final int ZVEC_INDEX_TYPE_IVF_RABITQ- See Also:
-
ZVEC_INDEX_TYPE_INVERT
public static final int ZVEC_INDEX_TYPE_INVERT- See Also:
-
ZVEC_INDEX_TYPE_FTS
public static final int ZVEC_INDEX_TYPE_FTS- See Also:
-
ZVEC_METRIC_TYPE_UNDEFINED
public static final int ZVEC_METRIC_TYPE_UNDEFINEDDistance metric type codes (must match zvec::MetricType in zvec/db/type.h) These are defined as uint32_t constants instead of C enums to ensure consistent binary representation across C and C++ boundaries.- See Also:
-
ZVEC_METRIC_TYPE_L2
public static final int ZVEC_METRIC_TYPE_L2- See Also:
-
ZVEC_METRIC_TYPE_IP
public static final int ZVEC_METRIC_TYPE_IP- See Also:
-
ZVEC_METRIC_TYPE_COSINE
public static final int ZVEC_METRIC_TYPE_COSINE- See Also:
-
ZVEC_METRIC_TYPE_MIPSL2
public static final int ZVEC_METRIC_TYPE_MIPSL2- See Also:
-
ZVEC_QUANTIZE_TYPE_UNDEFINED
public static final int ZVEC_QUANTIZE_TYPE_UNDEFINEDQuantization type codes (must match zvec::QuantizeType in zvec/db/type.h) These are defined as uint32_t constants instead of C enums to ensure consistent binary representation across C and C++ boundaries.- See Also:
-
ZVEC_QUANTIZE_TYPE_FP16
public static final int ZVEC_QUANTIZE_TYPE_FP16- See Also:
-
ZVEC_QUANTIZE_TYPE_INT8
public static final int ZVEC_QUANTIZE_TYPE_INT8- See Also:
-
ZVEC_QUANTIZE_TYPE_INT4
public static final int ZVEC_QUANTIZE_TYPE_INT4- See Also:
-
ZVEC_QUANTIZE_TYPE_RABITQ
public static final int ZVEC_QUANTIZE_TYPE_RABITQ- See Also:
-
ZVEC_DOC_OP_INSERT
public static final int ZVEC_DOC_OP_INSERTenum zvec_doc_operator_t- See Also:
-
ZVEC_DOC_OP_UPDATE
public static final int ZVEC_DOC_OP_UPDATEenum zvec_doc_operator_t- See Also:
-
ZVEC_DOC_OP_UPSERT
public static final int ZVEC_DOC_OP_UPSERTenum zvec_doc_operator_t- See Also:
-
ZVEC_DOC_OP_DELETE
public static final int ZVEC_DOC_OP_DELETEenum zvec_doc_operator_t- See Also:
-
-
Constructor Details
-
ZvecNative
public ZvecNative()
-
-
Method Details
-
zvec_get_version
@Cast("const char*") public static org.bytedeco.javacpp.BytePointer zvec_get_version()Get library version information Return format: "{base_version}[-{git_info}] (built {build_time})" Example: "0.3.0-g3f8a2b1 (built 2025-05-13 10:30:45)"- Returns:
- const char* Version string, managed internally by the library, caller should not free
-
zvec_check_version
@Cast("bool") public static boolean zvec_check_version(int major, int minor, int patch) Check API version compatibility Check if the current library version meets the specified minimum version requirements Following semantic versioning specification: MAJOR.MINOR.PATCH- Parameters:
major- Required major version numberminor- Required minor version numberpatch- Required patch version number- Returns:
- bool Returns true if compatible, false otherwise
-
zvec_get_version_major
public static int zvec_get_version_major()Get major version number- Returns:
- int Major version number
-
zvec_get_version_minor
public static int zvec_get_version_minor()Get minor version number- Returns:
- int Minor version number
-
zvec_get_version_patch
public static int zvec_get_version_patch()Get patch version number- Returns:
- int Patch version number
-
zvec_get_last_error_details
@Cast("zvec_error_code_t") public static int zvec_get_last_error_details(ZvecNative.zvec_error_details_t error_details) Get detailed information of the last error- Parameters:
error_details- [out] Pointer to error details structure- Returns:
- zvec_error_code_t Error code
-
zvec_get_last_error
@Cast("zvec_error_code_t") public static int zvec_get_last_error(@Cast("char**") org.bytedeco.javacpp.PointerPointer error_msg) Get last error message- Parameters:
error_msg- [out] Returned error message string (needs to be freed by calling free)- Returns:
- zvec_error_code_t Error code
-
zvec_get_last_error
@Cast("zvec_error_code_t") public static int zvec_get_last_error(@Cast("char**") @ByPtrPtr org.bytedeco.javacpp.BytePointer error_msg) -
zvec_get_last_error
@Cast("zvec_error_code_t") public static int zvec_get_last_error(@Cast("char**") @ByPtrPtr ByteBuffer error_msg) -
zvec_get_last_error
@Cast("zvec_error_code_t") public static int zvec_get_last_error(@Cast("char**") @ByPtrPtr byte[] error_msg) -
zvec_clear_error
public static void zvec_clear_error()Clear error status -
zvec_string_create
public static ZvecNative.zvec_string_t zvec_string_create(@Cast("const char*") org.bytedeco.javacpp.BytePointer str) Create string from C string- Parameters:
str- C string- Returns:
- zvec_string_t* Pointer to the newly created string
-
zvec_string_create
-
zvec_string_create_from_view
public static ZvecNative.zvec_string_t zvec_string_create_from_view(@Const ZvecNative.zvec_string_view_t view) Create string from string view Creates a new zvec_string_t by copying data from a zvec_string_view_t. The created string owns its memory and must be freed with zvec_free_string().- Parameters:
view- Pointer to source string view (must not be NULL)- Returns:
- zvec_string_t* New string instance on success, NULL on error Note: Caller is responsible for freeing the returned string
-
zvec_bin_create
public static ZvecNative.zvec_string_t zvec_bin_create(@Cast("const uint8_t*") org.bytedeco.javacpp.BytePointer data, @Cast("size_t") long length) Create binary-safe string from raw data Creates a new zvec_string_t from raw binary data that may contain null bytes. Unlike zvec_string_create(), this function takes explicit length parameter and doesn't rely on null-termination. The created string owns its memory and must be freed with zvec_free_string().- Parameters:
data- Raw binary data pointer (must not be NULL)length- Length of data in bytes- Returns:
- zvec_string_t* New string instance on success, NULL on error Note: Caller is responsible for freeing the returned string Note: This function is suitable for binary data containing null bytes
-
zvec_bin_create
public static ZvecNative.zvec_string_t zvec_bin_create(@Cast("const uint8_t*") ByteBuffer data, @Cast("size_t") long length) -
zvec_bin_create
public static ZvecNative.zvec_string_t zvec_bin_create(@Cast("const uint8_t*") byte[] data, @Cast("size_t") long length) -
zvec_string_copy
Copy string Creates a new zvec_string_t by copying an existing string. The created string owns its memory and must be freed with zvec_free_string().- Parameters:
str- Pointer to source string (must not be NULL)- Returns:
- zvec_string_t* New string instance on success, NULL on error Note: Caller is responsible for freeing the returned string
-
zvec_string_c_str
@Cast("const char*") public static org.bytedeco.javacpp.BytePointer zvec_string_c_str(@Const ZvecNative.zvec_string_t str) Get C string from zvec_string_t- Parameters:
str- zvec_string_t pointer- Returns:
- const char* C string
-
zvec_string_length
Get string length- Parameters:
str- zvec_string_t pointer- Returns:
- size_t String length
-
zvec_string_compare
public static int zvec_string_compare(@Const ZvecNative.zvec_string_t str1, @Const ZvecNative.zvec_string_t str2) Compare two strings- Parameters:
str1- First stringstr2- Second string- Returns:
- int Comparison result (-1, 0, or 1)
-
zvec_free_string
Free string memory- Parameters:
str- String pointer to free
-
zvec_string_array_create
Create a new string array- Parameters:
count- Initial number of strings to allocate space for- Returns:
- Pointer to the newly created string array, or NULL on failure
-
zvec_string_array_add
public static void zvec_string_array_add(ZvecNative.zvec_string_array_t array, @Cast("size_t") long idx, @Cast("const char*") org.bytedeco.javacpp.BytePointer str) Add a string to the string array at specified index- Parameters:
array- String array pointeridx- Index position where the string should be addedstr- Null-terminated C string to add
-
zvec_string_array_add
public static void zvec_string_array_add(ZvecNative.zvec_string_array_t array, @Cast("size_t") long idx, String str) -
zvec_string_array_destroy
Destroy string array and free all associated memory- Parameters:
array- String array pointer to destroy
-
zvec_byte_array_create
public static ZvecNative.zvec_mutable_byte_array_t zvec_byte_array_create(@Cast("size_t") long _capacity) Create a new mutable byte array- Parameters:
capacity- Initial capacity in bytes- Returns:
- Pointer to the newly created byte array, or NULL on failure
-
zvec_byte_array_destroy
Destroy byte array and free all associated memory- Parameters:
array- Byte array pointer to destroy
-
zvec_float_array_create
Create a new float array- Parameters:
count- Number of floats to allocate space for- Returns:
- Pointer to the newly created float array, or NULL on failure
-
zvec_float_array_destroy
Destroy float array and free all associated memory- Parameters:
array- Float array pointer to destroy
-
zvec_int64_array_create
Create a new int64 array- Parameters:
count- Number of int64 values to allocate space for- Returns:
- Pointer to the newly created int64 array, or NULL on failure
-
zvec_int64_array_destroy
Destroy int64 array and free all associated memory- Parameters:
array- Int64 array pointer to destroy
-
zvec_free_uint8_array
public static void zvec_free_uint8_array(@Cast("uint8_t*") org.bytedeco.javacpp.BytePointer array) Release uint8_t array memory- Parameters:
array- uint8_t array pointer
-
zvec_free_uint8_array
-
zvec_free_uint8_array
public static void zvec_free_uint8_array(@Cast("uint8_t*") byte[] array) -
zvec_malloc
public static org.bytedeco.javacpp.Pointer zvec_malloc(@Cast("size_t") long size) Allocate memory within the zvec library Use this function instead of malloc to ensure memory is managed consistently within the library. All memory allocated with zvec_malloc should be freed with zvec_free.- Parameters:
size- Number of bytes to allocate- Returns:
- Pointer to allocated memory, or NULL on failure
- See Also:
-
zvec_free
public static void zvec_free(org.bytedeco.javacpp.Pointer ptr) Free memory allocated by zvec_malloc or zvec library functions Use this function instead of free to ensure memory is managed consistently within the library. This should be used to free any memory allocated with zvec_malloc or returned by library functions that document they return library-allocated memory.- Parameters:
ptr- Pointer to memory to free (can be NULL)- See Also:
-
zvec_config_log_create_console
public static ZvecNative.zvec_log_config_t zvec_config_log_create_console(@Cast("zvec_log_level_t") int level) Create console log configuration- Parameters:
level- Log level- Returns:
- zvec_log_config_t* Pointer to the newly created log configuration
-
zvec_config_log_create_file
public static ZvecNative.zvec_log_config_t zvec_config_log_create_file(@Cast("zvec_log_level_t") int level, @Cast("const char*") org.bytedeco.javacpp.BytePointer dir, @Cast("const char*") org.bytedeco.javacpp.BytePointer basename, @Cast("uint32_t") int file_size, @Cast("uint32_t") int overdue_days) Create file log configuration- Parameters:
level- Log leveldir- Log directorybasename- Log file base namefile_size- Log file size (MB)overdue_days- Log expiration days- Returns:
- zvec_log_config_t* Pointer to the newly created log configuration
-
zvec_config_log_create_file
public static ZvecNative.zvec_log_config_t zvec_config_log_create_file(@Cast("zvec_log_level_t") int level, String dir, String basename, @Cast("uint32_t") int file_size, @Cast("uint32_t") int overdue_days) -
zvec_config_log_destroy
Destroy log configuration- Parameters:
config- Log configuration pointer
-
zvec_config_log_get_level
@Cast("zvec_log_level_t") public static int zvec_config_log_get_level(@Const ZvecNative.zvec_log_config_t config) Get log level from log config- Parameters:
config- Log configuration pointer- Returns:
- zvec_log_level_t Log level
-
zvec_config_log_set_level
@Cast("zvec_error_code_t") public static int zvec_config_log_set_level(ZvecNative.zvec_log_config_t config, @Cast("zvec_log_level_t") int level) Set log level in log config- Parameters:
config- Log configuration pointerlevel- Log level- Returns:
- zvec_error_code_t Error code
-
zvec_config_log_is_file_type
@Cast("bool") public static boolean zvec_config_log_is_file_type(@Const ZvecNative.zvec_log_config_t config) Check if log config is file type- Parameters:
config- Log configuration pointer- Returns:
- true if file type, false if console type
-
zvec_config_log_get_dir
@Cast("const char*") public static org.bytedeco.javacpp.BytePointer zvec_config_log_get_dir(@Const ZvecNative.zvec_log_config_t config) Get log directory from file log config- Parameters:
config- Log configuration pointer (must be file type)- Returns:
- const char* Log directory (owned by config, do not free) Note: Only valid for file log config, returns NULL for console config
-
zvec_config_log_set_dir
@Cast("zvec_error_code_t") public static int zvec_config_log_set_dir(ZvecNative.zvec_log_config_t config, @Cast("const char*") org.bytedeco.javacpp.BytePointer dir) Set log directory in file log config- Parameters:
config- Log configuration pointer (must be file type)dir- Log directory- Returns:
- zvec_error_code_t Error code
-
zvec_config_log_set_dir
@Cast("zvec_error_code_t") public static int zvec_config_log_set_dir(ZvecNative.zvec_log_config_t config, String dir) -
zvec_config_log_get_basename
@Cast("const char*") public static org.bytedeco.javacpp.BytePointer zvec_config_log_get_basename(@Const ZvecNative.zvec_log_config_t config) Get log file basename from file log config- Parameters:
config- Log configuration pointer (must be file type)- Returns:
- const char* Log file basename (owned by config, do not free) Note: Only valid for file log config, returns NULL for console config
-
zvec_config_log_set_basename
@Cast("zvec_error_code_t") public static int zvec_config_log_set_basename(ZvecNative.zvec_log_config_t config, @Cast("const char*") org.bytedeco.javacpp.BytePointer basename) Set log file basename in file log config- Parameters:
config- Log configuration pointer (must be file type)basename- Log file basename- Returns:
- zvec_error_code_t Error code
-
zvec_config_log_set_basename
@Cast("zvec_error_code_t") public static int zvec_config_log_set_basename(ZvecNative.zvec_log_config_t config, String basename) -
zvec_config_log_get_file_size
@Cast("uint32_t") public static int zvec_config_log_get_file_size(@Const ZvecNative.zvec_log_config_t config) Get log file size from file log config- Parameters:
config- Log configuration pointer (must be file type)- Returns:
- uint32_t Log file size in MB Note: Only valid for file log config, returns 0 for console config
-
zvec_config_log_set_file_size
@Cast("zvec_error_code_t") public static int zvec_config_log_set_file_size(ZvecNative.zvec_log_config_t config, @Cast("uint32_t") int file_size) Set log file size in file log config- Parameters:
config- Log configuration pointer (must be file type)file_size- Log file size in MB- Returns:
- zvec_error_code_t Error code
-
zvec_config_log_get_overdue_days
@Cast("uint32_t") public static int zvec_config_log_get_overdue_days(@Const ZvecNative.zvec_log_config_t config) Get log overdue days from file log config- Parameters:
config- Log configuration pointer (must be file type)- Returns:
- uint32_t Log overdue days Note: Only valid for file log config, returns 0 for console config
-
zvec_config_log_set_overdue_days
@Cast("zvec_error_code_t") public static int zvec_config_log_set_overdue_days(ZvecNative.zvec_log_config_t config, @Cast("uint32_t") int days) Set log overdue days in file log config- Parameters:
config- Log configuration pointer (must be file type)days- Log overdue days- Returns:
- zvec_error_code_t Error code
-
zvec_config_data_create
Create configuration data- Returns:
- zvec_config_data_t* Pointer to the newly created configuration data
-
zvec_config_data_destroy
Destroy configuration data- Parameters:
config- Configuration data pointer
-
zvec_config_data_set_memory_limit
@Cast("zvec_error_code_t") public static int zvec_config_data_set_memory_limit(ZvecNative.zvec_config_data_t config, @Cast("uint64_t") long memory_limit_bytes) Set memory limit in configuration data- Parameters:
config- Configuration data pointermemory_limit_bytes- Memory limit in bytes- Returns:
- zvec_error_code_t Error code
-
zvec_config_data_get_memory_limit
@Cast("uint64_t") public static long zvec_config_data_get_memory_limit(@Const ZvecNative.zvec_config_data_t config) Get memory limit from configuration data- Parameters:
config- Configuration data pointer- Returns:
- uint64_t Memory limit in bytes
-
zvec_config_data_set_log_config
@Cast("zvec_error_code_t") public static int zvec_config_data_set_log_config(ZvecNative.zvec_config_data_t config, ZvecNative.zvec_log_config_t log_config) Set log configuration in configuration data- Parameters:
config- Configuration data pointerlog_config- Log configuration pointer (ownership is transferred to config, do not free separately)- Returns:
- zvec_error_code_t Error code
-
zvec_config_data_get_log_type
@Cast("zvec_log_type_t") public static int zvec_config_data_get_log_type(@Const ZvecNative.zvec_config_data_t config) Get log type from configuration data- Parameters:
config- Configuration data pointer- Returns:
- zvec_log_type_t Log type
-
zvec_config_data_set_query_thread_count
@Cast("zvec_error_code_t") public static int zvec_config_data_set_query_thread_count(ZvecNative.zvec_config_data_t config, @Cast("uint32_t") int thread_count) Set query thread count in configuration data- Parameters:
config- Configuration data pointerthread_count- Query thread count- Returns:
- zvec_error_code_t Error code
-
zvec_config_data_get_query_thread_count
@Cast("uint32_t") public static int zvec_config_data_get_query_thread_count(@Const ZvecNative.zvec_config_data_t config) Get query thread count from configuration data- Parameters:
config- Configuration data pointer- Returns:
- uint32_t Query thread count
-
zvec_config_data_set_invert_to_forward_scan_ratio
@Cast("zvec_error_code_t") public static int zvec_config_data_set_invert_to_forward_scan_ratio(ZvecNative.zvec_config_data_t config, float ratio) Set invert to forward scan ratio in configuration data- Parameters:
config- Configuration data pointerratio- Invert to forward scan ratio- Returns:
- zvec_error_code_t Error code
-
zvec_config_data_get_invert_to_forward_scan_ratio
public static float zvec_config_data_get_invert_to_forward_scan_ratio(@Const ZvecNative.zvec_config_data_t config) Get invert to forward scan ratio from configuration data- Parameters:
config- Configuration data pointer- Returns:
- float Invert to forward scan ratio
-
zvec_config_data_set_brute_force_by_keys_ratio
@Cast("zvec_error_code_t") public static int zvec_config_data_set_brute_force_by_keys_ratio(ZvecNative.zvec_config_data_t config, float ratio) Set brute force by keys ratio in configuration data- Parameters:
config- Configuration data pointerratio- Brute force by keys ratio- Returns:
- zvec_error_code_t Error code
-
zvec_config_data_get_brute_force_by_keys_ratio
public static float zvec_config_data_get_brute_force_by_keys_ratio(@Const ZvecNative.zvec_config_data_t config) Get brute force by keys ratio from configuration data- Parameters:
config- Configuration data pointer- Returns:
- float Brute force by keys ratio
-
zvec_config_data_set_fts_brute_force_by_keys_ratio
@Cast("zvec_error_code_t") public static int zvec_config_data_set_fts_brute_force_by_keys_ratio(ZvecNative.zvec_config_data_t config, float ratio) Set FTS brute force by keys ratio in configuration data- Parameters:
config- Configuration data pointerratio- FTS brute force by keys ratio- Returns:
- zvec_error_code_t Error code
-
zvec_config_data_get_fts_brute_force_by_keys_ratio
public static float zvec_config_data_get_fts_brute_force_by_keys_ratio(@Const ZvecNative.zvec_config_data_t config) Get FTS brute force by keys ratio from configuration data- Parameters:
config- Configuration data pointer- Returns:
- float FTS brute force by keys ratio
-
zvec_config_data_set_optimize_thread_count
@Cast("zvec_error_code_t") public static int zvec_config_data_set_optimize_thread_count(ZvecNative.zvec_config_data_t config, @Cast("uint32_t") int thread_count) Set optimize thread count in configuration data- Parameters:
config- Configuration data pointerthread_count- Optimize thread count- Returns:
- zvec_error_code_t Error code
-
zvec_config_data_get_optimize_thread_count
@Cast("uint32_t") public static int zvec_config_data_get_optimize_thread_count(@Const ZvecNative.zvec_config_data_t config) Get optimize thread count from configuration data- Parameters:
config- Configuration data pointer- Returns:
- uint32_t Optimize thread count
-
zvec_config_data_set_jieba_dict_dir
@Cast("zvec_error_code_t") public static int zvec_config_data_set_jieba_dict_dir(ZvecNative.zvec_config_data_t config, @Cast("const char*") org.bytedeco.javacpp.BytePointer dir) Set jieba dict directory in configuration data- Parameters:
dir- Dict directory; NULL or empty leaves the field empty
-
zvec_config_data_set_jieba_dict_dir
@Cast("zvec_error_code_t") public static int zvec_config_data_set_jieba_dict_dir(ZvecNative.zvec_config_data_t config, String dir) -
zvec_config_data_get_jieba_dict_dir
@Cast("const char*") public static org.bytedeco.javacpp.BytePointer zvec_config_data_get_jieba_dict_dir(@Const ZvecNative.zvec_config_data_t config) Get jieba dict directory from configuration data- Returns:
- Pointer owned by config (do not free); empty when unset
-
zvec_initialize
@Cast("zvec_error_code_t") public static int zvec_initialize(@Const ZvecNative.zvec_config_data_t config) Initialize ZVec library- Parameters:
config- Configuration data (optional, NULL means using default configuration)- Returns:
- zvec_error_code_t Error code
-
zvec_shutdown
@Cast("zvec_error_code_t") public static int zvec_shutdown()Clean up ZVec library resources- Returns:
- zvec_error_code_t Error code
-
zvec_is_initialized
@Cast("bool") public static boolean zvec_is_initialized()Check if library is initialized- Returns:
- true if initialized, false otherwise
-
zvec_set_default_jieba_dict_dir
public static void zvec_set_default_jieba_dict_dir(@Cast("const char*") org.bytedeco.javacpp.BytePointer dir) Set the process-wide default jieba dict directory. For language SDKs to call on module load. Thread-safe, decoupled from zvec_initialize(); last writer wins. A subsequent zvec_initialize() with non-empty config.jieba_dict_dir overrides this. JiebaTokenizer priority: per-field > ZVEC_JIEBA_DICT_DIR > this.- Parameters:
dir- UTF-8 directory containing jieba.dict.utf8 + hmm_model.utf8; NULL or empty clears the value.
-
zvec_set_default_jieba_dict_dir
-
zvec_get_default_jieba_dict_dir
@Cast("const char*") public static org.bytedeco.javacpp.BytePointer zvec_get_default_jieba_dict_dir()Get the process-wide default jieba dict directory.- Returns:
- Thread-local string valid until the next call on this thread; empty when unset.
-
zvec_get_io_backend_type
@Cast("zvec_io_backend_type_t") public static int zvec_get_io_backend_type()Get the current I/O backend type for DiskAnn disk reads. Linux selects the first usable backend in this order: io_uring, libaio, then synchronous pread. macOS ARM64 uses synchronous pread.- Returns:
- zvec_io_backend_type_t The loaded backend type (ZVEC_IO_BACKEND_TYPE_IO_URING, ZVEC_IO_BACKEND_TYPE_LIBAIO, or ZVEC_IO_BACKEND_TYPE_PREAD).
-
zvec_get_io_backend_type_name
@Cast("const char*") public static org.bytedeco.javacpp.BytePointer zvec_get_io_backend_type_name(@Cast("zvec_io_backend_type_t") int type) Get a human-readable name for the given I/O backend type.- Parameters:
type- The backend type code.- Returns:
- Thread-local string valid until the next call on this thread; "io_uring", "libaio", "pread", or "unknown".
-
zvec_get_io_backend_description
@Cast("const char*") public static org.bytedeco.javacpp.BytePointer zvec_get_io_backend_description()Get a human-readable description of the current I/O backend. The description identifies io_uring, libaio, or pread. On Linux, the pread description also explains that io_uring and libaio were unavailable and provides guidance for enabling an asynchronous backend.- Returns:
- Thread-local string valid until the next call on this thread.
-
zvec_index_params_create
public static ZvecNative.zvec_index_params_t zvec_index_params_create(@Cast("zvec_index_type_t") int index_type) Create index parameters- Parameters:
index_type- Index type- Returns:
- Pointer to newly created zvec_index_params_t, or NULL on error
-
zvec_index_params_destroy
Destroy index parameters- Parameters:
params- Index parameters to destroy
-
zvec_index_params_get_type
@Cast("zvec_index_type_t") public static int zvec_index_params_get_type(@Const ZvecNative.zvec_index_params_t params) Get index type- Parameters:
params- Index parameters (must not be NULL)- Returns:
- Index type
-
zvec_index_params_set_metric_type
@Cast("zvec_error_code_t") public static int zvec_index_params_set_metric_type(ZvecNative.zvec_index_params_t params, @Cast("zvec_metric_type_t") int metric_type) Set metric type (for vector indexes)- Parameters:
params- Index parameters (must be vector index type)metric_type- Metric type- Returns:
- ZVEC_OK on success, error code on failure
-
zvec_index_params_get_metric_type
@Cast("zvec_metric_type_t") public static int zvec_index_params_get_metric_type(@Const ZvecNative.zvec_index_params_t params) Get metric type- Parameters:
params- Index parameters (must not be NULL)- Returns:
- Metric type
-
zvec_index_params_set_quantize_type
@Cast("zvec_error_code_t") public static int zvec_index_params_set_quantize_type(ZvecNative.zvec_index_params_t params, @Cast("zvec_quantize_type_t") int quantize_type) Set quantize type (for vector indexes)- Parameters:
params- Index parameters (must be vector index type)quantize_type- Quantize type- Returns:
- ZVEC_OK on success, error code on failure
-
zvec_index_params_get_quantize_type
@Cast("zvec_quantize_type_t") public static int zvec_index_params_get_quantize_type(@Const ZvecNative.zvec_index_params_t params) Get quantize type- Parameters:
params- Index parameters (must not be NULL)- Returns:
- Quantize type
-
zvec_index_params_set_quantizer_enable_rotate
@Cast("zvec_error_code_t") public static int zvec_index_params_set_quantizer_enable_rotate(ZvecNative.zvec_index_params_t params, @Cast("bool") boolean enable_rotate) Set enable_rotate for quantizer (only effective with INT8/INT4 quantize type) When enabled, vectors are randomly rotated before INT8/INT4 quantization to reduce quantization error. The rotation matrix is stored with the index and automatically applied to query vectors at search time.- Parameters:
params- Index parameters (must be vector index type)enable_rotate- Whether to enable random rotation before quantization- Returns:
- ZVEC_OK on success, error code on failure
-
zvec_index_params_get_quantizer_enable_rotate
@Cast("bool") public static boolean zvec_index_params_get_quantizer_enable_rotate(@Const ZvecNative.zvec_index_params_t params) Get enable_rotate setting from quantizer parameters- Parameters:
params- Index parameters (must not be NULL)- Returns:
- true if rotation is enabled, false otherwise (default)
-
zvec_index_params_set_hnsw_params
@Cast("zvec_error_code_t") public static int zvec_index_params_set_hnsw_params(ZvecNative.zvec_index_params_t params, int m, int ef_construction) Set HNSW specific parameters- Parameters:
params- Index parameters (must be HNSW type)m- Graph connectivity parameteref_construction- Construction exploration factor- Returns:
- ZVEC_OK on success, error code on failure
-
zvec_index_params_get_hnsw_m
Get HNSW m parameter- Parameters:
params- Index parameters (must not be NULL)- Returns:
- m parameter
-
zvec_index_params_get_hnsw_ef_construction
public static int zvec_index_params_get_hnsw_ef_construction(@Const ZvecNative.zvec_index_params_t params) Get HNSW ef_construction parameter- Parameters:
params- Index parameters (must not be NULL)- Returns:
- ef_construction parameter
-
zvec_index_params_set_vamana_params
@Cast("zvec_error_code_t") public static int zvec_index_params_set_vamana_params(ZvecNative.zvec_index_params_t params, int max_degree, int search_list_size, float alpha, @Cast("bool") boolean saturate_graph, @Cast("bool") boolean use_contiguous_memory) Set Vamana specific parameters- Parameters:
params- Index parameters (must be VAMANA type)max_degree- Maximum out-degree (R) of every node (default: 64)search_list_size- Candidate list size during construction (default: 100)alpha- RobustPrune alpha factor (default: 1.2)saturate_graph- Force every node to reach max_degree (default: false)use_contiguous_memory- Allocate contiguous memory arena (default: false)- Returns:
- ZVEC_OK on success, error code on failure
-
zvec_index_params_get_vamana_params
@Cast("zvec_error_code_t") public static int zvec_index_params_get_vamana_params(@Const ZvecNative.zvec_index_params_t params, org.bytedeco.javacpp.IntPointer out_max_degree, org.bytedeco.javacpp.IntPointer out_search_list_size, org.bytedeco.javacpp.FloatPointer out_alpha, @Cast("bool*") org.bytedeco.javacpp.BoolPointer out_saturate_graph, @Cast("bool*") org.bytedeco.javacpp.BoolPointer out_use_contiguous_memory) Get Vamana parameters (all at once)- Parameters:
params- Index parameters (must be VAMANA type)out_max_degree- [out] Maximum out-degreeout_search_list_size- [out] Construction candidate list sizeout_alpha- [out] RobustPrune alpha factorout_saturate_graph- [out] Whether saturate graph is enabledout_use_contiguous_memory- [out] Whether contiguous memory is enabled- Returns:
- ZVEC_OK on success, error code on failure
-
zvec_index_params_get_vamana_params
@Cast("zvec_error_code_t") public static int zvec_index_params_get_vamana_params(@Const ZvecNative.zvec_index_params_t params, IntBuffer out_max_degree, IntBuffer out_search_list_size, FloatBuffer out_alpha, @Cast("bool*") boolean[] out_saturate_graph, @Cast("bool*") boolean[] out_use_contiguous_memory) -
zvec_index_params_get_vamana_params
@Cast("zvec_error_code_t") public static int zvec_index_params_get_vamana_params(@Const ZvecNative.zvec_index_params_t params, int[] out_max_degree, int[] out_search_list_size, float[] out_alpha, @Cast("bool*") org.bytedeco.javacpp.BoolPointer out_saturate_graph, @Cast("bool*") org.bytedeco.javacpp.BoolPointer out_use_contiguous_memory) -
zvec_index_params_get_vamana_params
@Cast("zvec_error_code_t") public static int zvec_index_params_get_vamana_params(@Const ZvecNative.zvec_index_params_t params, org.bytedeco.javacpp.IntPointer out_max_degree, org.bytedeco.javacpp.IntPointer out_search_list_size, org.bytedeco.javacpp.FloatPointer out_alpha, @Cast("bool*") boolean[] out_saturate_graph, @Cast("bool*") boolean[] out_use_contiguous_memory) -
zvec_index_params_get_vamana_params
@Cast("zvec_error_code_t") public static int zvec_index_params_get_vamana_params(@Const ZvecNative.zvec_index_params_t params, IntBuffer out_max_degree, IntBuffer out_search_list_size, FloatBuffer out_alpha, @Cast("bool*") org.bytedeco.javacpp.BoolPointer out_saturate_graph, @Cast("bool*") org.bytedeco.javacpp.BoolPointer out_use_contiguous_memory) -
zvec_index_params_get_vamana_params
@Cast("zvec_error_code_t") public static int zvec_index_params_get_vamana_params(@Const ZvecNative.zvec_index_params_t params, int[] out_max_degree, int[] out_search_list_size, float[] out_alpha, @Cast("bool*") boolean[] out_saturate_graph, @Cast("bool*") boolean[] out_use_contiguous_memory) -
zvec_index_params_set_vamana_two_pass_build
@Cast("zvec_error_code_t") public static int zvec_index_params_set_vamana_two_pass_build(ZvecNative.zvec_index_params_t params, @Cast("bool") boolean two_pass_build) Enable or disable Vamana two-pass graph construction- Parameters:
params- Index parameters (must be VAMANA type)two_pass_build- Whether to run the full-graph second construction pass- Returns:
- ZVEC_OK on success, error code on failure
-
zvec_index_params_get_vamana_two_pass_build
@Cast("bool") public static boolean zvec_index_params_get_vamana_two_pass_build(@Const ZvecNative.zvec_index_params_t params) Get whether Vamana two-pass graph construction is enabled- Parameters:
params- Index parameters (must be VAMANA type)- Returns:
- true if two-pass construction is enabled, false otherwise
-
zvec_index_params_set_diskann_params
@Cast("zvec_error_code_t") public static int zvec_index_params_set_diskann_params(ZvecNative.zvec_index_params_t params, int max_degree, int list_size, int pq_chunk_num) Set DiskANN specific parameters- Parameters:
params- Index parameters (must be DiskANN type)max_degree- Graph connectivity (max degree of Vamana graph)list_size- Build-time list size (candidate list during construction)pq_chunk_num- PQ chunk count (0 disables PQ)- Returns:
- ZVEC_OK on success, error code on failure
-
zvec_index_params_get_diskann_max_degree
public static int zvec_index_params_get_diskann_max_degree(@Const ZvecNative.zvec_index_params_t params) Get DiskANN max_degree parameter- Parameters:
params- Index parameters (must not be NULL)- Returns:
- max_degree parameter
-
zvec_index_params_get_diskann_list_size
public static int zvec_index_params_get_diskann_list_size(@Const ZvecNative.zvec_index_params_t params) Get DiskANN list_size parameter- Parameters:
params- Index parameters (must not be NULL)- Returns:
- list_size parameter
-
zvec_index_params_get_diskann_pq_chunk_num
public static int zvec_index_params_get_diskann_pq_chunk_num(@Const ZvecNative.zvec_index_params_t params) Get DiskANN pq_chunk_num parameter- Parameters:
params- Index parameters (must not be NULL)- Returns:
- pq_chunk_num parameter
-
zvec_index_params_set_ivf_params
@Cast("zvec_error_code_t") public static int zvec_index_params_set_ivf_params(ZvecNative.zvec_index_params_t params, int n_list, int n_iters, @Cast("bool") boolean use_soar) Set IVF specific parameters- Parameters:
params- Index parameters (must be IVF type)n_list- Number of cluster centersn_iters- Number of iterationsuse_soar- Whether to use SOAR algorithm- Returns:
- ZVEC_OK on success, error code on failure
-
zvec_index_params_get_ivf_params
@Cast("zvec_error_code_t") public static int zvec_index_params_get_ivf_params(@Const ZvecNative.zvec_index_params_t params, org.bytedeco.javacpp.IntPointer out_n_list, org.bytedeco.javacpp.IntPointer out_n_iters, @Cast("bool*") org.bytedeco.javacpp.BoolPointer out_use_soar) Get IVF parameters (all at once)- Parameters:
params- Index parameters (must not be NULL)out_n_list- Output parameter for n_listout_n_iters- Output parameter for n_itersout_use_soar- Output parameter for use_soar- Returns:
- ZVEC_OK on success, error code on failure
-
zvec_index_params_get_ivf_params
@Cast("zvec_error_code_t") public static int zvec_index_params_get_ivf_params(@Const ZvecNative.zvec_index_params_t params, IntBuffer out_n_list, IntBuffer out_n_iters, @Cast("bool*") boolean[] out_use_soar) -
zvec_index_params_get_ivf_params
@Cast("zvec_error_code_t") public static int zvec_index_params_get_ivf_params(@Const ZvecNative.zvec_index_params_t params, int[] out_n_list, int[] out_n_iters, @Cast("bool*") org.bytedeco.javacpp.BoolPointer out_use_soar) -
zvec_index_params_get_ivf_params
@Cast("zvec_error_code_t") public static int zvec_index_params_get_ivf_params(@Const ZvecNative.zvec_index_params_t params, org.bytedeco.javacpp.IntPointer out_n_list, org.bytedeco.javacpp.IntPointer out_n_iters, @Cast("bool*") boolean[] out_use_soar) -
zvec_index_params_get_ivf_params
@Cast("zvec_error_code_t") public static int zvec_index_params_get_ivf_params(@Const ZvecNative.zvec_index_params_t params, IntBuffer out_n_list, IntBuffer out_n_iters, @Cast("bool*") org.bytedeco.javacpp.BoolPointer out_use_soar) -
zvec_index_params_get_ivf_params
@Cast("zvec_error_code_t") public static int zvec_index_params_get_ivf_params(@Const ZvecNative.zvec_index_params_t params, int[] out_n_list, int[] out_n_iters, @Cast("bool*") boolean[] out_use_soar) -
zvec_index_params_set_ivf_rabitq_params
@Cast("zvec_error_code_t") public static int zvec_index_params_set_ivf_rabitq_params(ZvecNative.zvec_index_params_t params, int nlist, int total_bits, int sample_count) Set IVF RaBitQ specific parameters- Parameters:
params- Index parameters (must be IVF_RABITQ type)nlist- Number of cluster centerstotal_bits- Total bits for RaBitQ quantizationsample_count- Sample count for training, 0 means use all vectors- Returns:
- ZVEC_OK on success, error code on failure
-
zvec_index_params_get_ivf_rabitq_params
@Cast("zvec_error_code_t") public static int zvec_index_params_get_ivf_rabitq_params(@Const ZvecNative.zvec_index_params_t params, org.bytedeco.javacpp.IntPointer out_nlist, org.bytedeco.javacpp.IntPointer out_total_bits, org.bytedeco.javacpp.IntPointer out_sample_count) Get IVF RaBitQ parameters (all at once)- Parameters:
params- Index parameters (must be IVF_RABITQ type)out_nlist- Output parameter for nlistout_total_bits- Output parameter for total_bitsout_sample_count- Output parameter for sample_count- Returns:
- ZVEC_OK on success, error code on failure
-
zvec_index_params_get_ivf_rabitq_params
@Cast("zvec_error_code_t") public static int zvec_index_params_get_ivf_rabitq_params(@Const ZvecNative.zvec_index_params_t params, IntBuffer out_nlist, IntBuffer out_total_bits, IntBuffer out_sample_count) -
zvec_index_params_get_ivf_rabitq_params
@Cast("zvec_error_code_t") public static int zvec_index_params_get_ivf_rabitq_params(@Const ZvecNative.zvec_index_params_t params, int[] out_nlist, int[] out_total_bits, int[] out_sample_count) -
zvec_index_params_get_invert_params
@Cast("zvec_error_code_t") public static int zvec_index_params_get_invert_params(@Const ZvecNative.zvec_index_params_t params, @Cast("bool*") org.bytedeco.javacpp.BoolPointer out_enable_range_opt, @Cast("bool*") org.bytedeco.javacpp.BoolPointer out_enable_wildcard) Get invert index parameters (all at once)- Parameters:
params- Index parameters (must not be NULL)out_enable_range_opt- Output parameter for enable_range_optimizationout_enable_wildcard- Output parameter for enable_extended_wildcard- Returns:
- ZVEC_OK on success, error code on failure
-
zvec_index_params_get_invert_params
@Cast("zvec_error_code_t") public static int zvec_index_params_get_invert_params(@Const ZvecNative.zvec_index_params_t params, @Cast("bool*") boolean[] out_enable_range_opt, @Cast("bool*") boolean[] out_enable_wildcard) -
zvec_index_params_set_invert_params
@Cast("zvec_error_code_t") public static int zvec_index_params_set_invert_params(ZvecNative.zvec_index_params_t params, @Cast("bool") boolean enable_range_opt, @Cast("bool") boolean enable_wildcard) Set invert index specific parameters- Parameters:
params- Index parameters (must be INVERT type)enable_range_opt- Whether to enable range optimizationenable_wildcard- Whether to enable extended wildcard- Returns:
- ZVEC_OK on success, error code on failure
-
zvec_index_params_set_fts_params
@Cast("zvec_error_code_t") public static int zvec_index_params_set_fts_params(ZvecNative.zvec_index_params_t params, @Cast("const char*") org.bytedeco.javacpp.BytePointer tokenizer_name, @Const ZvecNative.zvec_string_array_t filters, @Cast("const char*") org.bytedeco.javacpp.BytePointer extra_params) Set FTS index specific parameters- Parameters:
params- Index parameters (must be FTS type)tokenizer_name- Tokenizer pipeline name (NULL keeps current value). Supported values are "standard", "ngram", "jieba", and "whitespace".filters- Token filter names (NULL keeps current value). Supported values are "lowercase", "ascii_folding", and "stemmer".extra_params- Additional tokenizer/filter parameters (NULL keeps current value). Must be empty or a JSON object string. Supported keys by tokenizer/filter: Tokenizers: standard: - "max_token_length" (positive integer). ngram: - "ngram_min" (positive integer, default 2). - "ngram_max" (positive integer, default 2). - "token_chars" (array of "letter", "digit", "whitespace", "punctuation", "symbol"; default [] keeps all valid UTF-8 characters). custom_token_chars is not supported. jieba: - "jieba_dict_dir" (directory containing jieba.dict.utf8 and hmm_model.utf8). - "user_dict_path" (user dictionary path). - "cut_mode" ("search", "mix", "full", or "hmm"; default "search"). whitespace: - no extra_params. Filters: lowercase: - no extra_params. ascii_folding: - no extra_params. stemmer: - "stemmer_lang" (Snowball language/algorithm; default "english"), for example {"stemmer_lang":"porter"} for ES behaviour.- Returns:
- ZVEC_OK on success, error code on failure
-
zvec_index_params_set_fts_params
@Cast("zvec_error_code_t") public static int zvec_index_params_set_fts_params(ZvecNative.zvec_index_params_t params, String tokenizer_name, @Const ZvecNative.zvec_string_array_t filters, String extra_params) -
zvec_index_params_get_fts_params
@Cast("zvec_error_code_t") public static int zvec_index_params_get_fts_params(@Const ZvecNative.zvec_index_params_t params, @Cast("const char**") org.bytedeco.javacpp.PointerPointer out_tokenizer_name, @Cast("zvec_string_array_t**") org.bytedeco.javacpp.PointerPointer out_filters, @Cast("const char**") org.bytedeco.javacpp.PointerPointer out_extra_params) Get FTS index parameters (all at once)- Parameters:
params- Index parameters (must be FTS type)out_tokenizer_name- Output parameter for tokenizer name (can be NULL, owned by params, do not free)out_filters- Output parameter for filter list (can be NULL); caller must call zvec_string_array_destroy() to freeout_extra_params- Output parameter for extra params (can be NULL, owned by params, do not free)- Returns:
- ZVEC_OK on success, error code on failure
-
zvec_index_params_get_fts_params
@Cast("zvec_error_code_t") public static int zvec_index_params_get_fts_params(@Const ZvecNative.zvec_index_params_t params, @Cast("const char**") @ByPtrPtr org.bytedeco.javacpp.BytePointer out_tokenizer_name, @ByPtrPtr ZvecNative.zvec_string_array_t out_filters, @Cast("const char**") @ByPtrPtr org.bytedeco.javacpp.BytePointer out_extra_params) -
zvec_index_params_get_fts_params
@Cast("zvec_error_code_t") public static int zvec_index_params_get_fts_params(@Const ZvecNative.zvec_index_params_t params, @Cast("const char**") @ByPtrPtr ByteBuffer out_tokenizer_name, @ByPtrPtr ZvecNative.zvec_string_array_t out_filters, @Cast("const char**") @ByPtrPtr ByteBuffer out_extra_params) -
zvec_index_params_get_fts_params
@Cast("zvec_error_code_t") public static int zvec_index_params_get_fts_params(@Const ZvecNative.zvec_index_params_t params, @Cast("const char**") @ByPtrPtr byte[] out_tokenizer_name, @ByPtrPtr ZvecNative.zvec_string_array_t out_filters, @Cast("const char**") @ByPtrPtr byte[] out_extra_params) -
zvec_query_params_hnsw_create
public static ZvecNative.zvec_hnsw_query_params_t zvec_query_params_hnsw_create(int ef, float radius, @Cast("bool") boolean is_linear, @Cast("bool") boolean is_using_refiner) Create HNSW query parameters- Parameters:
ef- Exploration factor during search (default: 40)radius- Search radius (default: 0.0)is_linear- Whether linear search (default: false)is_using_refiner- Whether using refiner (default: false)- Returns:
- zvec_hnsw_query_params_t* Pointer to the newly created HNSW query parameters
-
zvec_query_params_hnsw_destroy
Destroy HNSW query parameters- Parameters:
params- HNSW query parameters pointer
-
zvec_query_params_hnsw_set_ef
@Cast("zvec_error_code_t") public static int zvec_query_params_hnsw_set_ef(ZvecNative.zvec_hnsw_query_params_t params, int ef) Set exploration factor- Parameters:
params- HNSW query parameters pointeref- Exploration factor- Returns:
- zvec_error_code_t Error code
-
zvec_query_params_hnsw_get_ef
Get exploration factor- Parameters:
params- HNSW query parameters pointer- Returns:
- int Exploration factor
-
zvec_query_params_hnsw_set_radius
@Cast("zvec_error_code_t") public static int zvec_query_params_hnsw_set_radius(ZvecNative.zvec_hnsw_query_params_t params, float radius) Set search radius (common parameter from QueryParams base)- Parameters:
params- HNSW query parameters pointerradius- Search radius- Returns:
- zvec_error_code_t Error code
-
zvec_query_params_hnsw_get_radius
public static float zvec_query_params_hnsw_get_radius(@Const ZvecNative.zvec_hnsw_query_params_t params) Get search radius (common parameter from QueryParams base)- Parameters:
params- HNSW query parameters pointer- Returns:
- float Search radius
-
zvec_query_params_hnsw_set_is_linear
@Cast("zvec_error_code_t") public static int zvec_query_params_hnsw_set_is_linear(ZvecNative.zvec_hnsw_query_params_t params, @Cast("bool") boolean is_linear) Set linear search mode (common parameter from QueryParams base)- Parameters:
params- HNSW query parameters pointeris_linear- Whether linear search- Returns:
- zvec_error_code_t Error code
-
zvec_query_params_hnsw_get_is_linear
@Cast("bool") public static boolean zvec_query_params_hnsw_get_is_linear(@Const ZvecNative.zvec_hnsw_query_params_t params) Get linear search mode (common parameter from QueryParams base)- Parameters:
params- HNSW query parameters pointer- Returns:
- bool Whether linear search
-
zvec_query_params_hnsw_set_is_using_refiner
@Cast("zvec_error_code_t") public static int zvec_query_params_hnsw_set_is_using_refiner(ZvecNative.zvec_hnsw_query_params_t params, @Cast("bool") boolean is_using_refiner) Set whether to use refiner (common parameter from QueryParams base)- Parameters:
params- HNSW query parameters pointeris_using_refiner- Whether to use refiner- Returns:
- zvec_error_code_t Error code
-
zvec_query_params_hnsw_get_is_using_refiner
@Cast("bool") public static boolean zvec_query_params_hnsw_get_is_using_refiner(@Const ZvecNative.zvec_hnsw_query_params_t params) Get whether to use refiner (common parameter from QueryParams base)- Parameters:
params- HNSW query parameters pointer- Returns:
- bool Whether to use refiner
-
zvec_query_params_ivf_create
public static ZvecNative.zvec_ivf_query_params_t zvec_query_params_ivf_create(int nprobe, @Cast("bool") boolean is_using_refiner, float scale_factor) Create IVF query parameters- Parameters:
nprobe- Number of clusters to probe (default: 10)is_using_refiner- Whether using refiner (default: false)scale_factor- Scale factor (default: 10.0)- Returns:
- zvec_ivf_query_params_t* Pointer to the newly created IVF query parameters
-
zvec_query_params_ivf_destroy
Destroy IVF query parameters- Parameters:
params- IVF query parameters pointer
-
zvec_query_params_ivf_set_nprobe
@Cast("zvec_error_code_t") public static int zvec_query_params_ivf_set_nprobe(ZvecNative.zvec_ivf_query_params_t params, int nprobe) Set number of probe clusters- Parameters:
params- IVF query parameters pointernprobe- Number of probe clusters- Returns:
- zvec_error_code_t Error code
-
zvec_query_params_ivf_get_nprobe
public static int zvec_query_params_ivf_get_nprobe(@Const ZvecNative.zvec_ivf_query_params_t params) Get number of probe clusters- Parameters:
params- IVF query parameters pointer- Returns:
- int Number of probe clusters
-
zvec_query_params_ivf_set_scale_factor
@Cast("zvec_error_code_t") public static int zvec_query_params_ivf_set_scale_factor(ZvecNative.zvec_ivf_query_params_t params, float scale_factor) Set scale factor- Parameters:
params- IVF query parameters pointerscale_factor- Scale factor- Returns:
- zvec_error_code_t Error code
-
zvec_query_params_ivf_get_scale_factor
public static float zvec_query_params_ivf_get_scale_factor(@Const ZvecNative.zvec_ivf_query_params_t params) Get scale factor- Parameters:
params- IVF query parameters pointer- Returns:
- float Scale factor
-
zvec_query_params_ivf_set_radius
@Cast("zvec_error_code_t") public static int zvec_query_params_ivf_set_radius(ZvecNative.zvec_ivf_query_params_t params, float radius) Set search radius (common parameter from QueryParams base)- Parameters:
params- IVF query parameters pointerradius- Search radius- Returns:
- zvec_error_code_t Error code
-
zvec_query_params_ivf_get_radius
public static float zvec_query_params_ivf_get_radius(@Const ZvecNative.zvec_ivf_query_params_t params) Get search radius (common parameter from QueryParams base)- Parameters:
params- IVF query parameters pointer- Returns:
- float Search radius
-
zvec_query_params_ivf_set_is_linear
@Cast("zvec_error_code_t") public static int zvec_query_params_ivf_set_is_linear(ZvecNative.zvec_ivf_query_params_t params, @Cast("bool") boolean is_linear) Set linear search mode (common parameter from QueryParams base)- Parameters:
params- IVF query parameters pointeris_linear- Whether linear search- Returns:
- zvec_error_code_t Error code
-
zvec_query_params_ivf_get_is_linear
@Cast("bool") public static boolean zvec_query_params_ivf_get_is_linear(@Const ZvecNative.zvec_ivf_query_params_t params) Get linear search mode (common parameter from QueryParams base)- Parameters:
params- IVF query parameters pointer- Returns:
- bool Whether linear search
-
zvec_query_params_ivf_set_is_using_refiner
@Cast("zvec_error_code_t") public static int zvec_query_params_ivf_set_is_using_refiner(ZvecNative.zvec_ivf_query_params_t params, @Cast("bool") boolean is_using_refiner) Set whether to use refiner (common parameter from QueryParams base)- Parameters:
params- IVF query parameters pointeris_using_refiner- Whether to use refiner- Returns:
- zvec_error_code_t Error code
-
zvec_query_params_ivf_get_is_using_refiner
@Cast("bool") public static boolean zvec_query_params_ivf_get_is_using_refiner(@Const ZvecNative.zvec_ivf_query_params_t params) Get whether to use refiner (common parameter from QueryParams base)- Parameters:
params- IVF query parameters pointer- Returns:
- bool Whether to use refiner
-
zvec_query_params_ivf_rabitq_create
public static ZvecNative.zvec_ivf_rabitq_query_params_t zvec_query_params_ivf_rabitq_create(int nprobe, float radius, @Cast("bool") boolean is_linear, @Cast("bool") boolean is_using_refiner) Create IVF RaBitQ query parameters- Parameters:
nprobe- Number of clusters to probe (default: 10)radius- Search radius (default: 0.0)is_linear- Whether linear search (default: false)is_using_refiner- Whether using refiner (default: false)- Returns:
- zvec_ivf_rabitq_query_params_t* Pointer to the newly created IVF RaBitQ query parameters
-
zvec_query_params_ivf_rabitq_destroy
public static void zvec_query_params_ivf_rabitq_destroy(ZvecNative.zvec_ivf_rabitq_query_params_t params) Destroy IVF RaBitQ query parameters- Parameters:
params- IVF RaBitQ query parameters pointer
-
zvec_query_params_ivf_rabitq_set_nprobe
@Cast("zvec_error_code_t") public static int zvec_query_params_ivf_rabitq_set_nprobe(ZvecNative.zvec_ivf_rabitq_query_params_t params, int nprobe) Set number of probe clusters- Parameters:
params- IVF RaBitQ query parameters pointernprobe- Number of probe clusters- Returns:
- zvec_error_code_t Error code
-
zvec_query_params_ivf_rabitq_get_nprobe
public static int zvec_query_params_ivf_rabitq_get_nprobe(@Const ZvecNative.zvec_ivf_rabitq_query_params_t params) Get number of probe clusters- Parameters:
params- IVF RaBitQ query parameters pointer- Returns:
- int Number of probe clusters
-
zvec_query_params_ivf_rabitq_set_scale_factor
@Cast("zvec_error_code_t") public static int zvec_query_params_ivf_rabitq_set_scale_factor(ZvecNative.zvec_ivf_rabitq_query_params_t params, float scale_factor) Set candidate expansion factor used by the refiner- Parameters:
params- IVF RaBitQ query parameters pointerscale_factor- Candidate expansion factor- Returns:
- zvec_error_code_t Error code
-
zvec_query_params_ivf_rabitq_get_scale_factor
public static float zvec_query_params_ivf_rabitq_get_scale_factor(@Const ZvecNative.zvec_ivf_rabitq_query_params_t params) Get candidate expansion factor used by the refiner- Parameters:
params- IVF RaBitQ query parameters pointer- Returns:
- float Candidate expansion factor
-
zvec_query_params_ivf_rabitq_set_radius
@Cast("zvec_error_code_t") public static int zvec_query_params_ivf_rabitq_set_radius(ZvecNative.zvec_ivf_rabitq_query_params_t params, float radius) Set search radius- Parameters:
params- IVF RaBitQ query parameters pointerradius- Search radius- Returns:
- zvec_error_code_t Error code
-
zvec_query_params_ivf_rabitq_get_radius
public static float zvec_query_params_ivf_rabitq_get_radius(@Const ZvecNative.zvec_ivf_rabitq_query_params_t params) Get search radius- Parameters:
params- IVF RaBitQ query parameters pointer- Returns:
- float Search radius
-
zvec_query_params_ivf_rabitq_set_is_linear
@Cast("zvec_error_code_t") public static int zvec_query_params_ivf_rabitq_set_is_linear(ZvecNative.zvec_ivf_rabitq_query_params_t params, @Cast("bool") boolean is_linear) Set linear search mode- Parameters:
params- IVF RaBitQ query parameters pointeris_linear- Whether linear search- Returns:
- zvec_error_code_t Error code
-
zvec_query_params_ivf_rabitq_get_is_linear
@Cast("bool") public static boolean zvec_query_params_ivf_rabitq_get_is_linear(@Const ZvecNative.zvec_ivf_rabitq_query_params_t params) Get linear search mode- Parameters:
params- IVF RaBitQ query parameters pointer- Returns:
- bool Whether linear search
-
zvec_query_params_ivf_rabitq_set_is_using_refiner
@Cast("zvec_error_code_t") public static int zvec_query_params_ivf_rabitq_set_is_using_refiner(ZvecNative.zvec_ivf_rabitq_query_params_t params, @Cast("bool") boolean is_using_refiner) Set whether to use refiner- Parameters:
params- IVF RaBitQ query parameters pointeris_using_refiner- Whether to use refiner- Returns:
- zvec_error_code_t Error code
-
zvec_query_params_ivf_rabitq_get_is_using_refiner
@Cast("bool") public static boolean zvec_query_params_ivf_rabitq_get_is_using_refiner(@Const ZvecNative.zvec_ivf_rabitq_query_params_t params) Get whether to use refiner- Parameters:
params- IVF RaBitQ query parameters pointer- Returns:
- bool Whether to use refiner
-
zvec_query_params_flat_create
public static ZvecNative.zvec_flat_query_params_t zvec_query_params_flat_create(@Cast("bool") boolean is_using_refiner, float scale_factor) Create Flat query parameters- Parameters:
is_using_refiner- Whether using refiner (default: false)scale_factor- Scale factor (default: 10.0)- Returns:
- zvec_flat_query_params_t* Pointer to the newly created Flat query parameters
-
zvec_query_params_flat_destroy
Destroy Flat query parameters- Parameters:
params- Flat query parameters pointer
-
zvec_query_params_flat_set_scale_factor
@Cast("zvec_error_code_t") public static int zvec_query_params_flat_set_scale_factor(ZvecNative.zvec_flat_query_params_t params, float scale_factor) Set scale factor- Parameters:
params- Flat query parameters pointerscale_factor- Scale factor- Returns:
- zvec_error_code_t Error code
-
zvec_query_params_flat_get_scale_factor
public static float zvec_query_params_flat_get_scale_factor(@Const ZvecNative.zvec_flat_query_params_t params) Get scale factor- Parameters:
params- Flat query parameters pointer- Returns:
- float Scale factor
-
zvec_query_params_flat_set_radius
@Cast("zvec_error_code_t") public static int zvec_query_params_flat_set_radius(ZvecNative.zvec_flat_query_params_t params, float radius) Set search radius (common parameter from QueryParams base)- Parameters:
params- Flat query parameters pointerradius- Search radius- Returns:
- zvec_error_code_t Error code
-
zvec_query_params_flat_get_radius
public static float zvec_query_params_flat_get_radius(@Const ZvecNative.zvec_flat_query_params_t params) Get search radius (common parameter from QueryParams base)- Parameters:
params- Flat query parameters pointer- Returns:
- float Search radius
-
zvec_query_params_flat_set_is_linear
@Cast("zvec_error_code_t") public static int zvec_query_params_flat_set_is_linear(ZvecNative.zvec_flat_query_params_t params, @Cast("bool") boolean is_linear) Set linear search mode (common parameter from QueryParams base)- Parameters:
params- Flat query parameters pointeris_linear- Whether linear search- Returns:
- zvec_error_code_t Error code
-
zvec_query_params_flat_get_is_linear
@Cast("bool") public static boolean zvec_query_params_flat_get_is_linear(@Const ZvecNative.zvec_flat_query_params_t params) Get linear search mode (common parameter from QueryParams base)- Parameters:
params- Flat query parameters pointer- Returns:
- bool Whether linear search
-
zvec_query_params_flat_set_is_using_refiner
@Cast("zvec_error_code_t") public static int zvec_query_params_flat_set_is_using_refiner(ZvecNative.zvec_flat_query_params_t params, @Cast("bool") boolean is_using_refiner) Set whether to use refiner (common parameter from QueryParams base)- Parameters:
params- Flat query parameters pointeris_using_refiner- Whether to use refiner- Returns:
- zvec_error_code_t Error code
-
zvec_query_params_flat_get_is_using_refiner
@Cast("bool") public static boolean zvec_query_params_flat_get_is_using_refiner(@Const ZvecNative.zvec_flat_query_params_t params) Get whether to use refiner (common parameter from QueryParams base)- Parameters:
params- Flat query parameters pointer- Returns:
- bool Whether to use refiner
-
zvec_query_params_fts_create
public static ZvecNative.zvec_fts_query_params_t zvec_query_params_fts_create(@Cast("const char*") org.bytedeco.javacpp.BytePointer default_operator) Create FTS query parameters- Parameters:
default_operator- Default boolean operator for adjacent bare terms: "OR" / "AND" (case-insensitive); NULL or "" keeps the built-in default- Returns:
- zvec_fts_query_params_t* Pointer to the newly created FTS query parameters
-
zvec_query_params_fts_create
public static ZvecNative.zvec_fts_query_params_t zvec_query_params_fts_create(String default_operator) -
zvec_query_params_fts_destroy
Destroy FTS query parameters- Parameters:
params- FTS query parameters pointer
-
zvec_query_params_fts_set_default_operator
@Cast("zvec_error_code_t") public static int zvec_query_params_fts_set_default_operator(ZvecNative.zvec_fts_query_params_t params, @Cast("const char*") org.bytedeco.javacpp.BytePointer default_operator) Set default boolean operator- Parameters:
params- FTS query parameters pointerdefault_operator- Default boolean operator- Returns:
- zvec_error_code_t Error code
-
zvec_query_params_fts_set_default_operator
@Cast("zvec_error_code_t") public static int zvec_query_params_fts_set_default_operator(ZvecNative.zvec_fts_query_params_t params, String default_operator) -
zvec_query_params_fts_get_default_operator
@Cast("const char*") public static org.bytedeco.javacpp.BytePointer zvec_query_params_fts_get_default_operator(@Const ZvecNative.zvec_fts_query_params_t params) Get default boolean operator- Parameters:
params- FTS query parameters pointer- Returns:
- const char* Default boolean operator (owned by params, do not free)
-
zvec_query_params_vamana_create
public static ZvecNative.zvec_vamana_query_params_t zvec_query_params_vamana_create(int ef_search, float radius, @Cast("bool") boolean is_linear, @Cast("bool") boolean is_using_refiner) Create Vamana query parameters- Parameters:
ef_search- Search-time candidate list size (default: 200)radius- Search radius (default: 0.0)is_linear- Whether linear search (default: false)is_using_refiner- Whether using refiner (default: false)- Returns:
- zvec_vamana_query_params_t* Pointer to the newly created Vamana query parameters
-
zvec_query_params_vamana_destroy
Destroy Vamana query parameters- Parameters:
params- Vamana query parameters pointer
-
zvec_query_params_vamana_set_ef_search
@Cast("zvec_error_code_t") public static int zvec_query_params_vamana_set_ef_search(ZvecNative.zvec_vamana_query_params_t params, int ef_search) Set search-time candidate list size- Parameters:
params- Vamana query parameters pointeref_search- Candidate list size- Returns:
- zvec_error_code_t Error code
-
zvec_query_params_vamana_get_ef_search
public static int zvec_query_params_vamana_get_ef_search(@Const ZvecNative.zvec_vamana_query_params_t params) Get search-time candidate list size- Parameters:
params- Vamana query parameters pointer- Returns:
- int Candidate list size
-
zvec_query_params_vamana_set_radius
@Cast("zvec_error_code_t") public static int zvec_query_params_vamana_set_radius(ZvecNative.zvec_vamana_query_params_t params, float radius) Set search radius- Parameters:
params- Vamana query parameters pointerradius- Search radius- Returns:
- zvec_error_code_t Error code
-
zvec_query_params_vamana_get_radius
public static float zvec_query_params_vamana_get_radius(@Const ZvecNative.zvec_vamana_query_params_t params) Get search radius- Parameters:
params- Vamana query parameters pointer- Returns:
- float Search radius
-
zvec_query_params_vamana_set_is_linear
@Cast("zvec_error_code_t") public static int zvec_query_params_vamana_set_is_linear(ZvecNative.zvec_vamana_query_params_t params, @Cast("bool") boolean is_linear) Set linear search mode- Parameters:
params- Vamana query parameters pointeris_linear- Whether linear search- Returns:
- zvec_error_code_t Error code
-
zvec_query_params_vamana_get_is_linear
@Cast("bool") public static boolean zvec_query_params_vamana_get_is_linear(@Const ZvecNative.zvec_vamana_query_params_t params) Get linear search mode- Parameters:
params- Vamana query parameters pointer- Returns:
- bool Whether linear search
-
zvec_query_params_vamana_set_is_using_refiner
@Cast("zvec_error_code_t") public static int zvec_query_params_vamana_set_is_using_refiner(ZvecNative.zvec_vamana_query_params_t params, @Cast("bool") boolean is_using_refiner) Set whether to use refiner- Parameters:
params- Vamana query parameters pointeris_using_refiner- Whether to use refiner- Returns:
- zvec_error_code_t Error code
-
zvec_query_params_vamana_get_is_using_refiner
@Cast("bool") public static boolean zvec_query_params_vamana_get_is_using_refiner(@Const ZvecNative.zvec_vamana_query_params_t params) Get whether to use refiner- Parameters:
params- Vamana query parameters pointer- Returns:
- bool Whether to use refiner
-
zvec_query_params_diskann_create
public static ZvecNative.zvec_diskann_query_params_t zvec_query_params_diskann_create(int list_size) Create DiskANN query parameters- Parameters:
list_size- Search frontier size (default: 300)- Returns:
- zvec_diskann_query_params_t* Pointer to the newly created DiskANN query parameters
-
zvec_query_params_diskann_destroy
Destroy DiskANN query parameters- Parameters:
params- DiskANN query parameters pointer
-
zvec_query_params_diskann_set_list_size
@Cast("zvec_error_code_t") public static int zvec_query_params_diskann_set_list_size(ZvecNative.zvec_diskann_query_params_t params, int list_size) Set search frontier size- Parameters:
params- DiskANN query parameters pointerlist_size- Search frontier size- Returns:
- zvec_error_code_t Error code
-
zvec_query_params_diskann_get_list_size
public static int zvec_query_params_diskann_get_list_size(@Const ZvecNative.zvec_diskann_query_params_t params) Get search frontier size- Parameters:
params- DiskANN query parameters pointer- Returns:
- int Search frontier size
-
zvec_query_params_diskann_set_radius
@Cast("zvec_error_code_t") public static int zvec_query_params_diskann_set_radius(ZvecNative.zvec_diskann_query_params_t params, float radius) Set search radius (common parameter from QueryParams base)- Parameters:
params- DiskANN query parameters pointerradius- Search radius- Returns:
- zvec_error_code_t Error code
-
zvec_query_params_diskann_get_radius
public static float zvec_query_params_diskann_get_radius(@Const ZvecNative.zvec_diskann_query_params_t params) Get search radius (common parameter from QueryParams base)- Parameters:
params- DiskANN query parameters pointer- Returns:
- float Search radius
-
zvec_query_params_diskann_set_is_linear
@Cast("zvec_error_code_t") public static int zvec_query_params_diskann_set_is_linear(ZvecNative.zvec_diskann_query_params_t params, @Cast("bool") boolean is_linear) Set linear search mode (common parameter from QueryParams base)- Parameters:
params- DiskANN query parameters pointeris_linear- Whether linear search- Returns:
- zvec_error_code_t Error code
-
zvec_query_params_diskann_get_is_linear
@Cast("bool") public static boolean zvec_query_params_diskann_get_is_linear(@Const ZvecNative.zvec_diskann_query_params_t params) Get linear search mode (common parameter from QueryParams base)- Parameters:
params- DiskANN query parameters pointer- Returns:
- bool Whether linear search
-
zvec_query_params_diskann_set_is_using_refiner
@Cast("zvec_error_code_t") public static int zvec_query_params_diskann_set_is_using_refiner(ZvecNative.zvec_diskann_query_params_t params, @Cast("bool") boolean is_using_refiner) Set whether to use refiner (common parameter from QueryParams base)- Parameters:
params- DiskANN query parameters pointeris_using_refiner- Whether to use refiner- Returns:
- zvec_error_code_t Error code
-
zvec_query_params_diskann_get_is_using_refiner
@Cast("bool") public static boolean zvec_query_params_diskann_get_is_using_refiner(@Const ZvecNative.zvec_diskann_query_params_t params) Get whether to use refiner (common parameter from QueryParams base)- Parameters:
params- DiskANN query parameters pointer- Returns:
- bool Whether to use refiner
-
zvec_vector_query_create
Create vector query- Returns:
- zvec_vector_query_t* Pointer to the newly created vector query
-
zvec_vector_query_destroy
Destroy vector query- Parameters:
query- Vector query pointer
-
zvec_vector_query_set_topk
@Cast("zvec_error_code_t") public static int zvec_vector_query_set_topk(ZvecNative.zvec_vector_query_t query, int topk) Set topk (number of results to return)- Parameters:
query- Vector query pointertopk- Number of results- Returns:
- zvec_error_code_t Error code
-
zvec_vector_query_get_topk
Get topk- Parameters:
query- Vector query pointer- Returns:
- int Number of results
-
zvec_vector_query_set_field_name
@Cast("zvec_error_code_t") public static int zvec_vector_query_set_field_name(ZvecNative.zvec_vector_query_t query, @Cast("const char*") org.bytedeco.javacpp.BytePointer field_name) Set field name- Parameters:
query- Vector query pointerfield_name- Field name- Returns:
- zvec_error_code_t Error code
-
zvec_vector_query_set_field_name
@Cast("zvec_error_code_t") public static int zvec_vector_query_set_field_name(ZvecNative.zvec_vector_query_t query, String field_name) -
zvec_vector_query_get_field_name
@Cast("const char*") public static org.bytedeco.javacpp.BytePointer zvec_vector_query_get_field_name(@Const ZvecNative.zvec_vector_query_t query) Get field name- Parameters:
query- Vector query pointer- Returns:
- const char* Field name (owned by query, do not free)
-
zvec_vector_query_set_query_vector
@Cast("zvec_error_code_t") public static int zvec_vector_query_set_query_vector(ZvecNative.zvec_vector_query_t query, @Const org.bytedeco.javacpp.Pointer data, @Cast("size_t") long size) Set query vector data- Parameters:
query- Vector query pointerdata- Vector data pointersize- Data size in bytes- Returns:
- zvec_error_code_t Error code
-
zvec_vector_query_set_filter
@Cast("zvec_error_code_t") public static int zvec_vector_query_set_filter(ZvecNative.zvec_vector_query_t query, @Cast("const char*") org.bytedeco.javacpp.BytePointer filter) Set filter expression- Parameters:
query- Vector query pointerfilter- Filter expression string- Returns:
- zvec_error_code_t Error code
-
zvec_vector_query_set_filter
@Cast("zvec_error_code_t") public static int zvec_vector_query_set_filter(ZvecNative.zvec_vector_query_t query, String filter) -
zvec_vector_query_get_filter
@Cast("const char*") public static org.bytedeco.javacpp.BytePointer zvec_vector_query_get_filter(@Const ZvecNative.zvec_vector_query_t query) Get filter expression- Parameters:
query- Vector query pointer- Returns:
- const char* Filter expression (owned by query, do not free)
-
zvec_vector_query_set_include_vector
@Cast("zvec_error_code_t") public static int zvec_vector_query_set_include_vector(ZvecNative.zvec_vector_query_t query, @Cast("bool") boolean include) Set whether to include vector data in results- Parameters:
query- Vector query pointerinclude- Whether to include vector- Returns:
- zvec_error_code_t Error code
-
zvec_vector_query_get_include_vector
@Cast("bool") public static boolean zvec_vector_query_get_include_vector(@Const ZvecNative.zvec_vector_query_t query) Get whether to include vector data in results- Parameters:
query- Vector query pointer- Returns:
- bool Whether to include vector
-
zvec_vector_query_set_include_doc_id
@Cast("zvec_error_code_t") public static int zvec_vector_query_set_include_doc_id(ZvecNative.zvec_vector_query_t query, @Cast("bool") boolean include) Set whether to include doc ID in results- Parameters:
query- Vector query pointerinclude- Whether to include doc ID- Returns:
- zvec_error_code_t Error code
-
zvec_vector_query_get_include_doc_id
@Cast("bool") public static boolean zvec_vector_query_get_include_doc_id(@Const ZvecNative.zvec_vector_query_t query) Get whether to include doc ID in results- Parameters:
query- Vector query pointer- Returns:
- bool Whether to include doc ID
-
zvec_vector_query_set_output_fields
@Cast("zvec_error_code_t") public static int zvec_vector_query_set_output_fields(ZvecNative.zvec_vector_query_t query, @Cast("const char**") org.bytedeco.javacpp.PointerPointer fields, @Cast("size_t") long count) Set output fields- Parameters:
query- Vector query pointerfields- Array of field namescount- Number of fields- Returns:
- zvec_error_code_t Error code
-
zvec_vector_query_set_output_fields
@Cast("zvec_error_code_t") public static int zvec_vector_query_set_output_fields(ZvecNative.zvec_vector_query_t query, @Cast("const char**") @ByPtrPtr org.bytedeco.javacpp.BytePointer fields, @Cast("size_t") long count) -
zvec_vector_query_set_output_fields
@Cast("zvec_error_code_t") public static int zvec_vector_query_set_output_fields(ZvecNative.zvec_vector_query_t query, @Cast("const char**") @ByPtrPtr ByteBuffer fields, @Cast("size_t") long count) -
zvec_vector_query_set_output_fields
@Cast("zvec_error_code_t") public static int zvec_vector_query_set_output_fields(ZvecNative.zvec_vector_query_t query, @Cast("const char**") @ByPtrPtr byte[] fields, @Cast("size_t") long count) -
zvec_vector_query_get_output_fields
@Cast("zvec_error_code_t") public static int zvec_vector_query_get_output_fields(@Const ZvecNative.zvec_vector_query_t query, @Cast("const char***") @ByPtrPtr org.bytedeco.javacpp.PointerPointer fields, @Cast("size_t*") org.bytedeco.javacpp.SizeTPointer count) Get output fields- Parameters:
query- Vector query pointerfields- [out] Output array of field names (allocated by library)count- [out] Number of fields- Returns:
- zvec_error_code_t Error code Note: The returned array is allocated by the library and should be freed using zvec_free() when no longer needed. The individual string pointers are owned by the query and must NOT be freed.
-
zvec_vector_query_set_query_params
@Cast("zvec_error_code_t") public static int zvec_vector_query_set_query_params(ZvecNative.zvec_vector_query_t query, org.bytedeco.javacpp.Pointer params) Set query parameters (takes ownership)- Parameters:
query- Vector query pointerparams- Query parameters pointer (type-specific: zvec_hnsw_query_params_t*, etc.)- Returns:
- zvec_error_code_t Error code
-
zvec_vector_query_set_hnsw_params
@Cast("zvec_error_code_t") public static int zvec_vector_query_set_hnsw_params(ZvecNative.zvec_vector_query_t query, ZvecNative.zvec_hnsw_query_params_t hnsw_params) Set HNSW query parameters (takes ownership)- Parameters:
query- Vector query pointerhnsw_params- HNSW query parameters pointer- Returns:
- zvec_error_code_t Error code
-
zvec_vector_query_set_ivf_params
@Cast("zvec_error_code_t") public static int zvec_vector_query_set_ivf_params(ZvecNative.zvec_vector_query_t query, ZvecNative.zvec_ivf_query_params_t ivf_params) Set IVF query parameters (takes ownership)- Parameters:
query- Vector query pointerivf_params- IVF query parameters pointer- Returns:
- zvec_error_code_t Error code
-
zvec_vector_query_set_ivf_rabitq_params
@Cast("zvec_error_code_t") public static int zvec_vector_query_set_ivf_rabitq_params(ZvecNative.zvec_vector_query_t query, ZvecNative.zvec_ivf_rabitq_query_params_t ivf_rabitq_params) Set IVF RaBitQ query parameters (takes ownership)- Parameters:
query- Vector query pointerivf_rabitq_params- IVF RaBitQ query parameters pointer- Returns:
- zvec_error_code_t Error code
-
zvec_vector_query_set_flat_params
@Cast("zvec_error_code_t") public static int zvec_vector_query_set_flat_params(ZvecNative.zvec_vector_query_t query, ZvecNative.zvec_flat_query_params_t flat_params) Set Flat query parameters (takes ownership)- Parameters:
query- Vector query pointerflat_params- Flat query parameters pointer- Returns:
- zvec_error_code_t Error code
-
zvec_vector_query_set_fts_params
@Cast("zvec_error_code_t") public static int zvec_vector_query_set_fts_params(ZvecNative.zvec_vector_query_t query, ZvecNative.zvec_fts_query_params_t fts_params) Set FTS query parameters (takes ownership)- Parameters:
query- Vector query pointerfts_params- FTS query parameters pointer- Returns:
- zvec_error_code_t Error code
-
zvec_vector_query_set_vamana_params
@Cast("zvec_error_code_t") public static int zvec_vector_query_set_vamana_params(ZvecNative.zvec_vector_query_t query, ZvecNative.zvec_vamana_query_params_t vamana_params) Set Vamana query parameters for vector query- Parameters:
query- Vector query pointervamana_params- Vamana query parameters pointer- Returns:
- zvec_error_code_t Error code
-
zvec_vector_query_set_diskann_params
@Cast("zvec_error_code_t") public static int zvec_vector_query_set_diskann_params(ZvecNative.zvec_vector_query_t query, ZvecNative.zvec_diskann_query_params_t diskann_params) Set DiskANN query parameters (takes ownership)- Parameters:
query- Vector query pointerdiskann_params- DiskANN query parameters pointer- Returns:
- zvec_error_code_t Error code
-
zvec_fts_create
Create FTS query payload- Returns:
- zvec_fts_t* Pointer to the newly created FTS query payload
-
zvec_fts_destroy
Destroy FTS query payload- Parameters:
fts- FTS query payload pointer
-
zvec_fts_set_query_string
@Cast("zvec_error_code_t") public static int zvec_fts_set_query_string(ZvecNative.zvec_fts_t fts, @Cast("const char*") org.bytedeco.javacpp.BytePointer query_string) Set FTS boolean / advanced query expression- Parameters:
fts- FTS query payload pointerquery_string- Query expression (NULL is treated as empty string)- Returns:
- zvec_error_code_t Error code
-
zvec_fts_set_query_string
@Cast("zvec_error_code_t") public static int zvec_fts_set_query_string(ZvecNative.zvec_fts_t fts, String query_string) -
zvec_fts_set_match_string
@Cast("zvec_error_code_t") public static int zvec_fts_set_match_string(ZvecNative.zvec_fts_t fts, @Cast("const char*") org.bytedeco.javacpp.BytePointer match_string) Set FTS natural-language match string- Parameters:
fts- FTS query payload pointermatch_string- Match string (NULL is treated as empty string)- Returns:
- zvec_error_code_t Error code
-
zvec_fts_set_match_string
@Cast("zvec_error_code_t") public static int zvec_fts_set_match_string(ZvecNative.zvec_fts_t fts, String match_string) -
zvec_fts_get_query_string
@Cast("const char*") public static org.bytedeco.javacpp.BytePointer zvec_fts_get_query_string(@Const ZvecNative.zvec_fts_t fts) Get FTS query expression- Parameters:
fts- FTS query payload pointer- Returns:
- const char* Query expression (owned by fts, do not free)
-
zvec_fts_get_match_string
@Cast("const char*") public static org.bytedeco.javacpp.BytePointer zvec_fts_get_match_string(@Const ZvecNative.zvec_fts_t fts) Get FTS match string- Parameters:
fts- FTS query payload pointer- Returns:
- const char* Match string (owned by fts, do not free)
-
zvec_vector_query_set_fts
@Cast("zvec_error_code_t") public static int zvec_vector_query_set_fts(ZvecNative.zvec_vector_query_t query, @Const ZvecNative.zvec_fts_t fts) Set FTS payload on a vector query (payload is copied)- Parameters:
query- Vector query pointerfts- FTS query payload pointer (NULL clears the payload)- Returns:
- zvec_error_code_t Error code
-
zvec_vector_query_get_fts
@Const public static ZvecNative.zvec_fts_t zvec_vector_query_get_fts(@Const ZvecNative.zvec_vector_query_t query) Get FTS payload attached to a vector query- Parameters:
query- Vector query pointer- Returns:
- const zvec_fts_t* FTS payload (owned by query, do not free), or NULL if no payload is attached
-
zvec_group_by_vector_query_create
Create group by vector query- Returns:
- zvec_group_by_vector_query_t* Pointer to the newly created group by vector query
-
zvec_group_by_vector_query_destroy
public static void zvec_group_by_vector_query_destroy(ZvecNative.zvec_group_by_vector_query_t query) Destroy group by vector query- Parameters:
query- Group by vector query pointer
-
zvec_group_by_vector_query_set_field_name
@Cast("zvec_error_code_t") public static int zvec_group_by_vector_query_set_field_name(ZvecNative.zvec_group_by_vector_query_t query, @Cast("const char*") org.bytedeco.javacpp.BytePointer field_name) Set field name- Parameters:
query- Group by vector query pointerfield_name- Field name- Returns:
- zvec_error_code_t Error code
-
zvec_group_by_vector_query_set_field_name
@Cast("zvec_error_code_t") public static int zvec_group_by_vector_query_set_field_name(ZvecNative.zvec_group_by_vector_query_t query, String field_name) -
zvec_group_by_vector_query_get_field_name
@Cast("const char*") public static org.bytedeco.javacpp.BytePointer zvec_group_by_vector_query_get_field_name(@Const ZvecNative.zvec_group_by_vector_query_t query) Get field name- Parameters:
query- Group by vector query pointer- Returns:
- const char* Field name (owned by query, do not free)
-
zvec_group_by_vector_query_set_group_by_field_name
@Cast("zvec_error_code_t") public static int zvec_group_by_vector_query_set_group_by_field_name(ZvecNative.zvec_group_by_vector_query_t query, @Cast("const char*") org.bytedeco.javacpp.BytePointer field_name) Set group by field name- Parameters:
query- Group by vector query pointerfield_name- Group by field name- Returns:
- zvec_error_code_t Error code
-
zvec_group_by_vector_query_set_group_by_field_name
@Cast("zvec_error_code_t") public static int zvec_group_by_vector_query_set_group_by_field_name(ZvecNative.zvec_group_by_vector_query_t query, String field_name) -
zvec_group_by_vector_query_get_group_by_field_name
@Cast("const char*") public static org.bytedeco.javacpp.BytePointer zvec_group_by_vector_query_get_group_by_field_name(@Const ZvecNative.zvec_group_by_vector_query_t query) Get group by field name- Parameters:
query- Group by vector query pointer- Returns:
- const char* Group by field name (owned by query, do not free)
-
zvec_group_by_vector_query_set_group_count
@Cast("zvec_error_code_t") public static int zvec_group_by_vector_query_set_group_count(ZvecNative.zvec_group_by_vector_query_t query, @Cast("uint32_t") int count) Set group count- Parameters:
query- Group by vector query pointercount- Number of groups- Returns:
- zvec_error_code_t Error code
-
zvec_group_by_vector_query_get_group_count
@Cast("uint32_t") public static int zvec_group_by_vector_query_get_group_count(@Const ZvecNative.zvec_group_by_vector_query_t query) Get group count- Parameters:
query- Group by vector query pointer- Returns:
- uint32_t Number of groups
-
zvec_group_by_vector_query_set_topk_per_group
@Cast("zvec_error_code_t") public static int zvec_group_by_vector_query_set_topk_per_group(ZvecNative.zvec_group_by_vector_query_t query, @Cast("uint32_t") int topk_per_group) Set the maximum number of results per group- Parameters:
query- Group by vector query pointertopk_per_group- Number of results per group- Returns:
- zvec_error_code_t Error code
-
zvec_group_by_vector_query_get_topk_per_group
@Cast("uint32_t") public static int zvec_group_by_vector_query_get_topk_per_group(@Const ZvecNative.zvec_group_by_vector_query_t query) Get the maximum number of results per group- Parameters:
query- Group by vector query pointer- Returns:
- uint32_t Number of results per group
-
zvec_group_by_vector_query_set_query_vector
@Cast("zvec_error_code_t") public static int zvec_group_by_vector_query_set_query_vector(ZvecNative.zvec_group_by_vector_query_t query, @Const org.bytedeco.javacpp.Pointer data, @Cast("size_t") long size) Set query vector data- Parameters:
query- Group by vector query pointerdata- Vector data pointersize- Data size in bytes- Returns:
- zvec_error_code_t Error code
-
zvec_group_by_vector_query_set_filter
@Cast("zvec_error_code_t") public static int zvec_group_by_vector_query_set_filter(ZvecNative.zvec_group_by_vector_query_t query, @Cast("const char*") org.bytedeco.javacpp.BytePointer filter) Set filter expression- Parameters:
query- Group by vector query pointerfilter- Filter expression string- Returns:
- zvec_error_code_t Error code
-
zvec_group_by_vector_query_set_filter
@Cast("zvec_error_code_t") public static int zvec_group_by_vector_query_set_filter(ZvecNative.zvec_group_by_vector_query_t query, String filter) -
zvec_group_by_vector_query_get_filter
@Cast("const char*") public static org.bytedeco.javacpp.BytePointer zvec_group_by_vector_query_get_filter(@Const ZvecNative.zvec_group_by_vector_query_t query) Get filter expression- Parameters:
query- Group by vector query pointer- Returns:
- const char* Filter expression (owned by query, do not free)
-
zvec_group_by_vector_query_set_include_vector
@Cast("zvec_error_code_t") public static int zvec_group_by_vector_query_set_include_vector(ZvecNative.zvec_group_by_vector_query_t query, @Cast("bool") boolean include) Set whether to include vector data in results- Parameters:
query- Group by vector query pointerinclude- Whether to include vectors- Returns:
- zvec_error_code_t Error code
-
zvec_group_by_vector_query_get_include_vector
@Cast("bool") public static boolean zvec_group_by_vector_query_get_include_vector(@Const ZvecNative.zvec_group_by_vector_query_t query) Get whether to include vector data in results- Parameters:
query- Group by vector query pointer- Returns:
- bool Whether to include vectors
-
zvec_group_by_vector_query_set_output_fields
@Cast("zvec_error_code_t") public static int zvec_group_by_vector_query_set_output_fields(ZvecNative.zvec_group_by_vector_query_t query, @Cast("const char**") org.bytedeco.javacpp.PointerPointer fields, @Cast("size_t") long count) Set output fields- Parameters:
query- Group by vector query pointerfields- Array of field namescount- Number of fields- Returns:
- zvec_error_code_t Error code
-
zvec_group_by_vector_query_set_output_fields
@Cast("zvec_error_code_t") public static int zvec_group_by_vector_query_set_output_fields(ZvecNative.zvec_group_by_vector_query_t query, @Cast("const char**") @ByPtrPtr org.bytedeco.javacpp.BytePointer fields, @Cast("size_t") long count) -
zvec_group_by_vector_query_set_output_fields
@Cast("zvec_error_code_t") public static int zvec_group_by_vector_query_set_output_fields(ZvecNative.zvec_group_by_vector_query_t query, @Cast("const char**") @ByPtrPtr ByteBuffer fields, @Cast("size_t") long count) -
zvec_group_by_vector_query_set_output_fields
@Cast("zvec_error_code_t") public static int zvec_group_by_vector_query_set_output_fields(ZvecNative.zvec_group_by_vector_query_t query, @Cast("const char**") @ByPtrPtr byte[] fields, @Cast("size_t") long count) -
zvec_group_by_vector_query_get_output_fields
@Cast("zvec_error_code_t") public static int zvec_group_by_vector_query_get_output_fields(ZvecNative.zvec_group_by_vector_query_t query, @Cast("const char***") @ByPtrPtr org.bytedeco.javacpp.PointerPointer fields, @Cast("size_t*") org.bytedeco.javacpp.SizeTPointer count) Get output fields- Parameters:
query- Group by vector query pointerfields- [out] Output array of field names (allocated by library)count- [out] Number of fields- Returns:
- zvec_error_code_t Error code Note: The returned array is allocated by the library and should be freed using zvec_free() when no longer needed. The individual string pointers are owned by the query and must NOT be freed.
-
zvec_group_by_vector_query_set_query_params
@Cast("zvec_error_code_t") public static int zvec_group_by_vector_query_set_query_params(ZvecNative.zvec_group_by_vector_query_t query, org.bytedeco.javacpp.Pointer params) Set query parameters (takes ownership)- Parameters:
query- Group by vector query pointerparams- Query parameters pointer- Returns:
- zvec_error_code_t Error code
-
zvec_group_by_vector_query_set_hnsw_params
@Cast("zvec_error_code_t") public static int zvec_group_by_vector_query_set_hnsw_params(ZvecNative.zvec_group_by_vector_query_t query, ZvecNative.zvec_hnsw_query_params_t hnsw_params) Set HNSW query parameters (takes ownership)- Parameters:
query- Group by vector query pointerhnsw_params- HNSW query parameters pointer- Returns:
- zvec_error_code_t Error code
-
zvec_group_by_vector_query_set_ivf_params
@Cast("zvec_error_code_t") public static int zvec_group_by_vector_query_set_ivf_params(ZvecNative.zvec_group_by_vector_query_t query, ZvecNative.zvec_ivf_query_params_t ivf_params) Set IVF query parameters (takes ownership)- Parameters:
query- Group by vector query pointerivf_params- IVF query parameters pointer- Returns:
- zvec_error_code_t Error code
-
zvec_group_by_vector_query_set_ivf_rabitq_params
@Cast("zvec_error_code_t") public static int zvec_group_by_vector_query_set_ivf_rabitq_params(ZvecNative.zvec_group_by_vector_query_t query, ZvecNative.zvec_ivf_rabitq_query_params_t ivf_rabitq_params) Set IVF RaBitQ query parameters (takes ownership)- Parameters:
query- Group by vector query pointerivf_rabitq_params- IVF RaBitQ query parameters pointer- Returns:
- zvec_error_code_t Error code
-
zvec_group_by_vector_query_set_flat_params
@Cast("zvec_error_code_t") public static int zvec_group_by_vector_query_set_flat_params(ZvecNative.zvec_group_by_vector_query_t query, ZvecNative.zvec_flat_query_params_t flat_params) Set Flat query parameters (takes ownership)- Parameters:
query- Group by vector query pointerflat_params- Flat query parameters pointer- Returns:
- zvec_error_code_t Error code
-
zvec_group_by_vector_query_set_vamana_params
@Cast("zvec_error_code_t") public static int zvec_group_by_vector_query_set_vamana_params(ZvecNative.zvec_group_by_vector_query_t query, ZvecNative.zvec_vamana_query_params_t vamana_params) Set Vamana query parameters (takes ownership)- Parameters:
query- Group by vector query pointervamana_params- Vamana query parameters pointer- Returns:
- zvec_error_code_t Error code
-
zvec_group_by_vector_query_set_diskann_params
@Cast("zvec_error_code_t") public static int zvec_group_by_vector_query_set_diskann_params(ZvecNative.zvec_group_by_vector_query_t query, ZvecNative.zvec_diskann_query_params_t diskann_params) Set DiskANN query parameters (takes ownership)- Parameters:
query- Group by vector query pointerdiskann_params- DiskANN query parameters pointer- Returns:
- zvec_error_code_t Error code
-
zvec_multi_query_set_rerank_rrf
@Cast("zvec_error_code_t") public static int zvec_multi_query_set_rerank_rrf(ZvecNative.zvec_multi_query_t query, int rank_constant) Set RRF rerank strategy on a multi-query.- Parameters:
query- Multi-query pointerrank_constant- RRF rank constant (default: 60)- Returns:
- Error code
-
zvec_multi_query_set_rerank_weighted
@Cast("zvec_error_code_t") public static int zvec_multi_query_set_rerank_weighted(ZvecNative.zvec_multi_query_t query, @Const org.bytedeco.javacpp.DoublePointer weights, @Cast("size_t") long weight_count) Set Weighted rerank strategy on a multi-query.- Parameters:
query- Multi-query pointerweights- Array of per-sub-query weightsweight_count- Number of weights- Returns:
- Error code
-
zvec_multi_query_set_rerank_weighted
@Cast("zvec_error_code_t") public static int zvec_multi_query_set_rerank_weighted(ZvecNative.zvec_multi_query_t query, @Const DoubleBuffer weights, @Cast("size_t") long weight_count) -
zvec_multi_query_set_rerank_weighted
@Cast("zvec_error_code_t") public static int zvec_multi_query_set_rerank_weighted(ZvecNative.zvec_multi_query_t query, @Const double[] weights, @Cast("size_t") long weight_count) -
zvec_multi_query_create
Create multi-query query- Returns:
- zvec_multi_query_t* Pointer to the newly created multi query
-
zvec_multi_query_destroy
Destroy multi-query query- Parameters:
query- Multi query pointer
-
zvec_multi_query_add_sub_query
@Cast("zvec_error_code_t") public static int zvec_multi_query_add_sub_query(ZvecNative.zvec_multi_query_t query, @Const ZvecNative.zvec_sub_query_t sub_query) Add a sub-query to the multi-query query- Parameters:
query- Multi query pointersub_query- Sub-query to add (copied, caller retains ownership)- Returns:
- zvec_error_code_t Error code
-
zvec_multi_query_get_sub_query_count
@Cast("size_t") public static long zvec_multi_query_get_sub_query_count(@Const ZvecNative.zvec_multi_query_t query) Get number of sub-queries- Parameters:
query- Multi query pointer- Returns:
- size_t Number of sub-queries
-
zvec_multi_query_set_topk
@Cast("zvec_error_code_t") public static int zvec_multi_query_set_topk(ZvecNative.zvec_multi_query_t query, int topk) Set topk- Parameters:
query- Multi-vector query pointertopk- Number of results- Returns:
- zvec_error_code_t Error code
-
zvec_multi_query_get_topk
Get topk- Parameters:
query- Multi-vector query pointer- Returns:
- int Number of results
-
zvec_multi_query_set_filter
@Cast("zvec_error_code_t") public static int zvec_multi_query_set_filter(ZvecNative.zvec_multi_query_t query, @Cast("const char*") org.bytedeco.javacpp.BytePointer filter) Set filter expression- Parameters:
query- Multi-vector query pointerfilter- Filter expression string- Returns:
- zvec_error_code_t Error code
-
zvec_multi_query_set_filter
@Cast("zvec_error_code_t") public static int zvec_multi_query_set_filter(ZvecNative.zvec_multi_query_t query, String filter) -
zvec_multi_query_get_filter
@Cast("const char*") public static org.bytedeco.javacpp.BytePointer zvec_multi_query_get_filter(@Const ZvecNative.zvec_multi_query_t query) Get filter expression- Parameters:
query- Multi-vector query pointer- Returns:
- const char* Filter expression (owned by query, do not free)
-
zvec_multi_query_set_include_vector
@Cast("zvec_error_code_t") public static int zvec_multi_query_set_include_vector(ZvecNative.zvec_multi_query_t query, @Cast("bool") boolean include) Set whether to include vector data in results- Parameters:
query- Multi-vector query pointerinclude- Whether to include vectors- Returns:
- zvec_error_code_t Error code
-
zvec_multi_query_get_include_vector
@Cast("bool") public static boolean zvec_multi_query_get_include_vector(@Const ZvecNative.zvec_multi_query_t query) Get whether to include vector data in results- Parameters:
query- Multi-vector query pointer- Returns:
- bool Whether to include vectors
-
zvec_multi_query_set_output_fields
@Cast("zvec_error_code_t") public static int zvec_multi_query_set_output_fields(ZvecNative.zvec_multi_query_t query, @Cast("const char**") org.bytedeco.javacpp.PointerPointer fields, @Cast("size_t") long count) Set output fields- Parameters:
query- Multi-vector query pointerfields- Array of field namescount- Number of fields- Returns:
- zvec_error_code_t Error code
-
zvec_multi_query_set_output_fields
@Cast("zvec_error_code_t") public static int zvec_multi_query_set_output_fields(ZvecNative.zvec_multi_query_t query, @Cast("const char**") @ByPtrPtr org.bytedeco.javacpp.BytePointer fields, @Cast("size_t") long count) -
zvec_multi_query_set_output_fields
@Cast("zvec_error_code_t") public static int zvec_multi_query_set_output_fields(ZvecNative.zvec_multi_query_t query, @Cast("const char**") @ByPtrPtr ByteBuffer fields, @Cast("size_t") long count) -
zvec_multi_query_set_output_fields
@Cast("zvec_error_code_t") public static int zvec_multi_query_set_output_fields(ZvecNative.zvec_multi_query_t query, @Cast("const char**") @ByPtrPtr byte[] fields, @Cast("size_t") long count) -
zvec_multi_query_get_output_fields
@Cast("zvec_error_code_t") public static int zvec_multi_query_get_output_fields(ZvecNative.zvec_multi_query_t query, @Cast("const char***") @ByPtrPtr org.bytedeco.javacpp.PointerPointer fields, @Cast("size_t*") org.bytedeco.javacpp.SizeTPointer count) Get output fields- Parameters:
query- Multi-vector query pointerfields- [out] Output array of field names (allocated by library)count- [out] Number of fields- Returns:
- zvec_error_code_t Error code Note: The returned array is allocated by the library and should be freed using zvec_free() when no longer needed. The individual string pointers are owned by the query and must NOT be freed.
-
zvec_sub_query_create
Create sub-query- Returns:
- zvec_sub_query_t* Pointer to the newly created sub-query
-
zvec_sub_query_destroy
Destroy sub-query- Parameters:
query- Sub-query pointer
-
zvec_sub_query_set_num_candidates
@Cast("zvec_error_code_t") public static int zvec_sub_query_set_num_candidates(ZvecNative.zvec_sub_query_t query, int num_candidates) Set number of candidates to retrieve per field- Parameters:
query- Sub-query pointernum_candidates- Number of candidates- Returns:
- zvec_error_code_t Error code
-
zvec_sub_query_get_num_candidates
Get number of candidates- Parameters:
query- Sub-query pointer- Returns:
- int Number of candidates
-
zvec_sub_query_set_field_name
@Cast("zvec_error_code_t") public static int zvec_sub_query_set_field_name(ZvecNative.zvec_sub_query_t query, @Cast("const char*") org.bytedeco.javacpp.BytePointer field_name) Set field name- Parameters:
query- Sub-query pointerfield_name- Field name- Returns:
- zvec_error_code_t Error code
-
zvec_sub_query_set_field_name
@Cast("zvec_error_code_t") public static int zvec_sub_query_set_field_name(ZvecNative.zvec_sub_query_t query, String field_name) -
zvec_sub_query_get_field_name
@Cast("const char*") public static org.bytedeco.javacpp.BytePointer zvec_sub_query_get_field_name(@Const ZvecNative.zvec_sub_query_t query) Get field name- Parameters:
query- Sub-query pointer- Returns:
- const char* Field name (owned by query, do not free)
-
zvec_sub_query_set_query_vector
@Cast("zvec_error_code_t") public static int zvec_sub_query_set_query_vector(ZvecNative.zvec_sub_query_t query, @Const org.bytedeco.javacpp.Pointer data, @Cast("size_t") long size) Set query vector data- Parameters:
query- Sub-query pointerdata- Vector data pointersize- Data size in bytes- Returns:
- zvec_error_code_t Error code
-
zvec_sub_query_set_sparse_vector
@Cast("zvec_error_code_t") public static int zvec_sub_query_set_sparse_vector(ZvecNative.zvec_sub_query_t query, @Cast("const uint32_t*") org.bytedeco.javacpp.IntPointer indices, @Const org.bytedeco.javacpp.FloatPointer values, @Cast("size_t") long count) Set sparse vector indices and values- Parameters:
query- Sub-query pointerindices- Array of uint32_t indicesvalues- Array of float valuescount- Number of sparse vector entries- Returns:
- zvec_error_code_t Error code
-
zvec_sub_query_set_sparse_vector
@Cast("zvec_error_code_t") public static int zvec_sub_query_set_sparse_vector(ZvecNative.zvec_sub_query_t query, @Cast("const uint32_t*") IntBuffer indices, @Const FloatBuffer values, @Cast("size_t") long count) -
zvec_sub_query_set_sparse_vector
@Cast("zvec_error_code_t") public static int zvec_sub_query_set_sparse_vector(ZvecNative.zvec_sub_query_t query, @Cast("const uint32_t*") int[] indices, @Const float[] values, @Cast("size_t") long count) -
zvec_sub_query_set_sparse_indices
@Cast("zvec_error_code_t") public static int zvec_sub_query_set_sparse_indices(ZvecNative.zvec_sub_query_t query, @Cast("const uint32_t*") org.bytedeco.javacpp.IntPointer indices, @Cast("size_t") long count) Set sparse vector indices- Parameters:
query- Sub-query pointerindices- Array of uint32_t indicescount- Number of indices- Returns:
- zvec_error_code_t Error code
-
zvec_sub_query_set_sparse_indices
@Cast("zvec_error_code_t") public static int zvec_sub_query_set_sparse_indices(ZvecNative.zvec_sub_query_t query, @Cast("const uint32_t*") IntBuffer indices, @Cast("size_t") long count) -
zvec_sub_query_set_sparse_indices
@Cast("zvec_error_code_t") public static int zvec_sub_query_set_sparse_indices(ZvecNative.zvec_sub_query_t query, @Cast("const uint32_t*") int[] indices, @Cast("size_t") long count) -
zvec_sub_query_set_sparse_values
@Cast("zvec_error_code_t") public static int zvec_sub_query_set_sparse_values(ZvecNative.zvec_sub_query_t query, @Const org.bytedeco.javacpp.FloatPointer values, @Cast("size_t") long count) Set sparse vector values- Parameters:
query- Sub-query pointervalues- Array of float valuescount- Number of values- Returns:
- zvec_error_code_t Error code
-
zvec_sub_query_set_sparse_values
@Cast("zvec_error_code_t") public static int zvec_sub_query_set_sparse_values(ZvecNative.zvec_sub_query_t query, @Const FloatBuffer values, @Cast("size_t") long count) -
zvec_sub_query_set_sparse_values
@Cast("zvec_error_code_t") public static int zvec_sub_query_set_sparse_values(ZvecNative.zvec_sub_query_t query, @Const float[] values, @Cast("size_t") long count) -
zvec_sub_query_set_hnsw_params
@Cast("zvec_error_code_t") public static int zvec_sub_query_set_hnsw_params(ZvecNative.zvec_sub_query_t query, ZvecNative.zvec_hnsw_query_params_t hnsw_params) Set HNSW query parameters (takes ownership)- Parameters:
query- Sub-query pointerhnsw_params- HNSW query parameters pointer- Returns:
- zvec_error_code_t Error code
-
zvec_sub_query_set_ivf_params
@Cast("zvec_error_code_t") public static int zvec_sub_query_set_ivf_params(ZvecNative.zvec_sub_query_t query, ZvecNative.zvec_ivf_query_params_t ivf_params) Set IVF query parameters (takes ownership)- Parameters:
query- Sub-query pointerivf_params- IVF query parameters pointer- Returns:
- zvec_error_code_t Error code
-
zvec_sub_query_set_ivf_rabitq_params
@Cast("zvec_error_code_t") public static int zvec_sub_query_set_ivf_rabitq_params(ZvecNative.zvec_sub_query_t query, ZvecNative.zvec_ivf_rabitq_query_params_t ivf_rabitq_params) Set IVF RaBitQ query parameters (takes ownership)- Parameters:
query- Sub-query pointerivf_rabitq_params- IVF RaBitQ query parameters pointer- Returns:
- zvec_error_code_t Error code
-
zvec_sub_query_set_flat_params
@Cast("zvec_error_code_t") public static int zvec_sub_query_set_flat_params(ZvecNative.zvec_sub_query_t query, ZvecNative.zvec_flat_query_params_t flat_params) Set Flat query parameters (takes ownership)- Parameters:
query- Sub-query pointerflat_params- Flat query parameters pointer- Returns:
- zvec_error_code_t Error code
-
zvec_sub_query_set_vamana_params
@Cast("zvec_error_code_t") public static int zvec_sub_query_set_vamana_params(ZvecNative.zvec_sub_query_t query, ZvecNative.zvec_vamana_query_params_t vamana_params) Set Vamana query parameters (takes ownership)- Parameters:
query- Sub-query pointervamana_params- Vamana query parameters pointer- Returns:
- zvec_error_code_t Error code
-
zvec_sub_query_set_fts_params
@Cast("zvec_error_code_t") public static int zvec_sub_query_set_fts_params(ZvecNative.zvec_sub_query_t query, ZvecNative.zvec_fts_query_params_t fts_params) Set FTS query parameters on a sub-query (takes ownership)- Parameters:
query- Sub-query pointerfts_params- FTS query parameters pointer- Returns:
- zvec_error_code_t Error code
-
zvec_sub_query_set_fts
@Cast("zvec_error_code_t") public static int zvec_sub_query_set_fts(ZvecNative.zvec_sub_query_t query, @Const ZvecNative.zvec_fts_t fts) Set FTS clause on a sub-query (copies the FTS clause)- Parameters:
query- Sub-query pointerfts- FTS clause pointer, or NULL to clear- Returns:
- zvec_error_code_t Error code
-
zvec_sub_query_set_diskann_params
@Cast("zvec_error_code_t") public static int zvec_sub_query_set_diskann_params(ZvecNative.zvec_sub_query_t query, ZvecNative.zvec_diskann_query_params_t diskann_params) Set DiskANN query parameters (takes ownership)- Parameters:
query- Sub-query pointerdiskann_params- DiskANN query parameters pointer- Returns:
- zvec_error_code_t Error code
-
zvec_collection_options_create
Create collection options- Returns:
- zvec_collection_options_t* Pointer to the newly created collection options
-
zvec_collection_options_destroy
Destroy collection options- Parameters:
options- Collection options pointer
-
zvec_collection_options_set_enable_mmap
@Cast("zvec_error_code_t") public static int zvec_collection_options_set_enable_mmap(ZvecNative.zvec_collection_options_t options, @Cast("bool") boolean enable) Set whether to enable memory mapping- Parameters:
options- Collection options pointerenable- Whether to enable mmap- Returns:
- zvec_error_code_t Error code
-
zvec_collection_options_get_enable_mmap
@Cast("bool") public static boolean zvec_collection_options_get_enable_mmap(@Const ZvecNative.zvec_collection_options_t options) Get whether to enable memory mapping- Parameters:
options- Collection options pointer- Returns:
- bool Whether mmap is enabled
-
zvec_collection_options_set_max_buffer_size
@Cast("zvec_error_code_t") public static int zvec_collection_options_set_max_buffer_size(ZvecNative.zvec_collection_options_t options, @Cast("size_t") long size) Set maximum buffer size- Parameters:
options- Collection options pointersize- Maximum buffer size in bytes- Returns:
- zvec_error_code_t Error code
-
zvec_collection_options_get_max_buffer_size
@Cast("size_t") public static long zvec_collection_options_get_max_buffer_size(@Const ZvecNative.zvec_collection_options_t options) Get maximum buffer size- Parameters:
options- Collection options pointer- Returns:
- size_t Maximum buffer size in bytes
-
zvec_collection_options_set_read_only
@Cast("zvec_error_code_t") public static int zvec_collection_options_set_read_only(ZvecNative.zvec_collection_options_t options, @Cast("bool") boolean read_only) Set whether read-only mode- Parameters:
options- Collection options pointerread_only- Whether read-only- Returns:
- zvec_error_code_t Error code
-
zvec_collection_options_get_read_only
@Cast("bool") public static boolean zvec_collection_options_get_read_only(@Const ZvecNative.zvec_collection_options_t options) Get whether read-only mode- Parameters:
options- Collection options pointer- Returns:
- bool Whether read-only mode
-
zvec_collection_stats_get_doc_count
@Cast("uint64_t") public static long zvec_collection_stats_get_doc_count(@Const ZvecNative.zvec_collection_stats_t stats) Get document count from collection stats- Parameters:
stats- Collection statistics pointer- Returns:
- uint64_t Document count
-
zvec_collection_stats_get_index_count
@Cast("size_t") public static long zvec_collection_stats_get_index_count(@Const ZvecNative.zvec_collection_stats_t stats) Get index count from collection stats- Parameters:
stats- Collection statistics pointer- Returns:
- size_t Number of indexes
-
zvec_collection_stats_get_index_name
@Cast("const char*") public static org.bytedeco.javacpp.BytePointer zvec_collection_stats_get_index_name(@Const ZvecNative.zvec_collection_stats_t stats, @Cast("size_t") long index) Get index name at specified index- Parameters:
stats- Collection statistics pointerindex- Index of the index name- Returns:
- const char* Index name (owned by stats, do not free)
-
zvec_collection_stats_get_index_completeness
public static float zvec_collection_stats_get_index_completeness(@Const ZvecNative.zvec_collection_stats_t stats, @Cast("size_t") long index) Get index completeness at specified index- Parameters:
stats- Collection statistics pointerindex- Index of the completeness value- Returns:
- float Index completeness
-
zvec_field_schema_create
public static ZvecNative.zvec_field_schema_t zvec_field_schema_create(@Cast("const char*") org.bytedeco.javacpp.BytePointer name, @Cast("zvec_data_type_t") int data_type, @Cast("bool") boolean nullable, @Cast("uint32_t") int dimension) Create field schema- Parameters:
name- Field namedata_type- Data typenullable- Whether nullabledimension- Vector dimension- Returns:
- zvec_field_schema_t* Pointer to the newly created field schema
-
zvec_field_schema_create
public static ZvecNative.zvec_field_schema_t zvec_field_schema_create(String name, @Cast("zvec_data_type_t") int data_type, @Cast("bool") boolean nullable, @Cast("uint32_t") int dimension) -
zvec_field_schema_destroy
Destroy field schema- Parameters:
schema- Field schema pointer
-
zvec_field_schema_set_name
@Cast("zvec_error_code_t") public static int zvec_field_schema_set_name(ZvecNative.zvec_field_schema_t schema, @Cast("const char*") org.bytedeco.javacpp.BytePointer name) Set field name- Parameters:
schema- Field schema pointername- New field name- Returns:
- zvec_error_code_t Error code
-
zvec_field_schema_set_name
@Cast("zvec_error_code_t") public static int zvec_field_schema_set_name(ZvecNative.zvec_field_schema_t schema, String name) -
zvec_field_schema_get_name
@Cast("const char*") public static org.bytedeco.javacpp.BytePointer zvec_field_schema_get_name(@Const ZvecNative.zvec_field_schema_t schema) Get field name- Parameters:
schema- Field schema pointer (must not be NULL)- Returns:
- const char* Field name (owned by schema, do not free)
-
zvec_field_schema_get_data_type
@Cast("zvec_data_type_t") public static int zvec_field_schema_get_data_type(@Const ZvecNative.zvec_field_schema_t schema) Get field data type- Parameters:
schema- Field schema pointer (must not be NULL)- Returns:
- zvec_data_type_t Data type
-
zvec_field_schema_set_data_type
@Cast("zvec_error_code_t") public static int zvec_field_schema_set_data_type(ZvecNative.zvec_field_schema_t schema, @Cast("zvec_data_type_t") int data_type) Set field data type- Parameters:
schema- Field schema pointerdata_type- New data type- Returns:
- zvec_error_code_t Error code
-
zvec_field_schema_get_element_data_type
@Cast("zvec_data_type_t") public static int zvec_field_schema_get_element_data_type(@Const ZvecNative.zvec_field_schema_t schema) Get element data type for array fields- Parameters:
schema- Field schema pointer (must not be NULL)- Returns:
- zvec_data_type_t Element data type, or original type if not array
-
zvec_field_schema_get_element_data_size
@Cast("size_t") public static long zvec_field_schema_get_element_data_size(@Const ZvecNative.zvec_field_schema_t schema) Get element data size for the field- Parameters:
schema- Field schema pointer (must not be NULL)- Returns:
- size_t Element data size in bytes, or 0 for variable-size types
-
zvec_field_schema_is_vector_field
@Cast("bool") public static boolean zvec_field_schema_is_vector_field(@Const ZvecNative.zvec_field_schema_t schema) Check if field is a vector field (dense or sparse)- Parameters:
schema- Field schema pointer (must not be NULL)- Returns:
- bool true if vector field, false otherwise
-
zvec_field_schema_is_dense_vector
@Cast("bool") public static boolean zvec_field_schema_is_dense_vector(@Const ZvecNative.zvec_field_schema_t schema) Check if field is a dense vector field- Parameters:
schema- Field schema pointer (must not be NULL)- Returns:
- bool true if dense vector field, false otherwise
-
zvec_field_schema_is_sparse_vector
@Cast("bool") public static boolean zvec_field_schema_is_sparse_vector(@Const ZvecNative.zvec_field_schema_t schema) Check if field is a sparse vector field- Parameters:
schema- Field schema pointer (must not be NULL)- Returns:
- bool true if sparse vector field, false otherwise
-
zvec_field_schema_is_nullable
@Cast("bool") public static boolean zvec_field_schema_is_nullable(@Const ZvecNative.zvec_field_schema_t schema) Check if field is nullable- Parameters:
schema- Field schema pointer (must not be NULL)- Returns:
- bool true if nullable, false otherwise
-
zvec_field_schema_set_nullable
@Cast("zvec_error_code_t") public static int zvec_field_schema_set_nullable(ZvecNative.zvec_field_schema_t schema, @Cast("bool") boolean nullable) Set field nullable- Parameters:
schema- Field schema pointernullable- Whether nullable- Returns:
- zvec_error_code_t Error code
-
zvec_field_schema_has_invert_index
@Cast("bool") public static boolean zvec_field_schema_has_invert_index(@Const ZvecNative.zvec_field_schema_t schema) Check if field has inverted index (for scalar fields)- Parameters:
schema- Field schema pointer (must not be NULL)- Returns:
- bool true if has inverted index, false otherwise
-
zvec_field_schema_is_array_type
@Cast("bool") public static boolean zvec_field_schema_is_array_type(@Const ZvecNative.zvec_field_schema_t schema) Check if field is an array type- Parameters:
schema- Field schema pointer (must not be NULL)- Returns:
- bool true if array type, false otherwise
-
zvec_field_schema_get_dimension
@Cast("uint32_t") public static int zvec_field_schema_get_dimension(@Const ZvecNative.zvec_field_schema_t schema) Get field dimension (for vector fields)- Parameters:
schema- Field schema pointer (must not be NULL)- Returns:
- uint32_t Dimension value
-
zvec_field_schema_set_dimension
@Cast("zvec_error_code_t") public static int zvec_field_schema_set_dimension(ZvecNative.zvec_field_schema_t schema, @Cast("uint32_t") int dimension) Set field dimension (for vector fields)- Parameters:
schema- Field schema pointerdimension- Dimension value- Returns:
- zvec_error_code_t Error code
-
zvec_field_schema_get_index_type
@Cast("zvec_index_type_t") public static int zvec_field_schema_get_index_type(@Const ZvecNative.zvec_field_schema_t schema) Get index type of the field- Parameters:
schema- Field schema pointer (must not be NULL)- Returns:
- zvec_index_type_t Index type, ZVEC_INDEX_TYPE_UNDEFINED if no index
-
zvec_field_schema_has_index
@Cast("bool") public static boolean zvec_field_schema_has_index(@Const ZvecNative.zvec_field_schema_t schema) Check if field has index- Parameters:
schema- Field schema pointer (must not be NULL)- Returns:
- bool true if field has index, false otherwise
-
zvec_field_schema_get_index_params
@Const public static ZvecNative.zvec_index_params_t zvec_field_schema_get_index_params(@Const ZvecNative.zvec_field_schema_t schema) Get index params of the field (returns pointer owned by the field schema, do not destroy. Pointer becomes invalid if schema is modified or destroyed)- Parameters:
schema- Field schema pointer (must not be NULL)- Returns:
- zvec_index_params_t* Index params pointer, NULL if no index
-
zvec_field_schema_set_index_params
@Cast("zvec_error_code_t") public static int zvec_field_schema_set_index_params(ZvecNative.zvec_field_schema_t schema, @Const ZvecNative.zvec_index_params_t index_params) Set index parameters for field- Parameters:
schema- Field schema pointerindex_params- Index parameters pointer (deep-copied internally, caller retains ownership and must call zvec_index_params_destroy after the call)- Returns:
- zvec_error_code_t Error code
-
zvec_field_schema_validate
@Cast("zvec_error_code_t") public static int zvec_field_schema_validate(@Const ZvecNative.zvec_field_schema_t schema, @Cast("zvec_string_t**") org.bytedeco.javacpp.PointerPointer error_msg) Validate field schema- Parameters:
schema- Field schema pointererror_msg- [out] Error message (needs to be freed by calling zvec_free_string)- Returns:
- zvec_error_code_t Error code
-
zvec_field_schema_validate
@Cast("zvec_error_code_t") public static int zvec_field_schema_validate(@Const ZvecNative.zvec_field_schema_t schema, @ByPtrPtr ZvecNative.zvec_string_t error_msg) -
zvec_collection_schema_create
public static ZvecNative.zvec_collection_schema_t zvec_collection_schema_create(@Cast("const char*") org.bytedeco.javacpp.BytePointer name) Create collection schema- Parameters:
name- Collection name- Returns:
- zvec_collection_schema_t* Pointer to the newly created collection schema
-
zvec_collection_schema_create
-
zvec_collection_schema_destroy
Destroy collection schema- Parameters:
schema- Collection schema pointer
-
zvec_collection_schema_get_name
@Cast("const char*") public static org.bytedeco.javacpp.BytePointer zvec_collection_schema_get_name(@Const ZvecNative.zvec_collection_schema_t schema) Get collection schema name- Parameters:
schema- Collection schema pointer (must not be NULL)- Returns:
- const char* Collection name string pointer Note: Returns a pointer to internal memory. Caller does NOT own the memory and should NOT free it. The pointer is valid as long as the schema exists.
-
zvec_collection_schema_set_name
@Cast("zvec_error_code_t") public static int zvec_collection_schema_set_name(ZvecNative.zvec_collection_schema_t schema, @Cast("const char*") org.bytedeco.javacpp.BytePointer name) Set collection schema name- Parameters:
schema- Collection schema pointername- New collection name- Returns:
- zvec_error_code_t Error code
-
zvec_collection_schema_set_name
@Cast("zvec_error_code_t") public static int zvec_collection_schema_set_name(ZvecNative.zvec_collection_schema_t schema, String name) -
zvec_collection_schema_add_field
@Cast("zvec_error_code_t") public static int zvec_collection_schema_add_field(ZvecNative.zvec_collection_schema_t schema, @Const ZvecNative.zvec_field_schema_t field) Add field to collection schema- Parameters:
schema- Collection schema pointerfield- Field schema pointer (will be cloned, caller retains ownership)- Returns:
- zvec_error_code_t Error code
-
zvec_collection_schema_alter_field
@Cast("zvec_error_code_t") public static int zvec_collection_schema_alter_field(ZvecNative.zvec_collection_schema_t schema, @Cast("const char*") org.bytedeco.javacpp.BytePointer field_name, @Const ZvecNative.zvec_field_schema_t new_field) Alter field schema- Parameters:
schema- Collection schema pointerfield_name- Name of field to alternew_field- New field schema with updated properties- Returns:
- zvec_error_code_t Error code
-
zvec_collection_schema_alter_field
@Cast("zvec_error_code_t") public static int zvec_collection_schema_alter_field(ZvecNative.zvec_collection_schema_t schema, String field_name, @Const ZvecNative.zvec_field_schema_t new_field) -
zvec_collection_schema_drop_field
@Cast("zvec_error_code_t") public static int zvec_collection_schema_drop_field(ZvecNative.zvec_collection_schema_t schema, @Cast("const char*") org.bytedeco.javacpp.BytePointer field_name) Drop field from schema- Parameters:
schema- Collection schema pointerfield_name- Field name to drop- Returns:
- zvec_error_code_t Error code
-
zvec_collection_schema_drop_field
@Cast("zvec_error_code_t") public static int zvec_collection_schema_drop_field(ZvecNative.zvec_collection_schema_t schema, String field_name) -
zvec_collection_schema_has_field
@Cast("bool") public static boolean zvec_collection_schema_has_field(@Const ZvecNative.zvec_collection_schema_t schema, @Cast("const char*") org.bytedeco.javacpp.BytePointer field_name) Check if field exists in schema- Parameters:
schema- Collection schema pointerfield_name- Field name to check- Returns:
- true if field exists, false otherwise
-
zvec_collection_schema_has_field
@Cast("bool") public static boolean zvec_collection_schema_has_field(@Const ZvecNative.zvec_collection_schema_t schema, String field_name) -
zvec_collection_schema_get_field
public static ZvecNative.zvec_field_schema_t zvec_collection_schema_get_field(@Const ZvecNative.zvec_collection_schema_t schema, @Cast("const char*") org.bytedeco.javacpp.BytePointer field_name) Get field by name- Parameters:
schema- Collection schema pointerfield_name- Field name- Returns:
- zvec_field_schema_t* Field schema pointer (non-owning, do not destroy), NULL if not found
-
zvec_collection_schema_get_field
public static ZvecNative.zvec_field_schema_t zvec_collection_schema_get_field(@Const ZvecNative.zvec_collection_schema_t schema, String field_name) -
zvec_collection_schema_get_forward_field
public static ZvecNative.zvec_field_schema_t zvec_collection_schema_get_forward_field(@Const ZvecNative.zvec_collection_schema_t schema, @Cast("const char*") org.bytedeco.javacpp.BytePointer field_name) Get forward (scalar) field by name- Parameters:
schema- Collection schema pointerfield_name- Field name- Returns:
- zvec_field_schema_t* Field schema pointer (non-owning, do not destroy), NULL if not found or not scalar
-
zvec_collection_schema_get_forward_field
public static ZvecNative.zvec_field_schema_t zvec_collection_schema_get_forward_field(@Const ZvecNative.zvec_collection_schema_t schema, String field_name) -
zvec_collection_schema_get_vector_field
public static ZvecNative.zvec_field_schema_t zvec_collection_schema_get_vector_field(@Const ZvecNative.zvec_collection_schema_t schema, @Cast("const char*") org.bytedeco.javacpp.BytePointer field_name) Get vector field by name- Parameters:
schema- Collection schema pointerfield_name- Field name- Returns:
- zvec_field_schema_t* Field schema pointer (non-owning, do not destroy), NULL if not found or not vector
-
zvec_collection_schema_get_vector_field
public static ZvecNative.zvec_field_schema_t zvec_collection_schema_get_vector_field(@Const ZvecNative.zvec_collection_schema_t schema, String field_name) -
zvec_collection_schema_get_forward_fields
@Cast("zvec_error_code_t") public static int zvec_collection_schema_get_forward_fields(@Const ZvecNative.zvec_collection_schema_t schema, @Cast("zvec_field_schema_t***") @ByPtrPtr org.bytedeco.javacpp.PointerPointer fields, @Cast("size_t*") org.bytedeco.javacpp.SizeTPointer count) Get all forward (scalar) fields- Parameters:
schema- Collection schema pointerfields- [out] Receives a newly allocated array of pointers to field schemas. The array is allocated by the library and should be freed using zvec_free() when no longer needed.count- [out] Number of fields- Returns:
- zvec_error_code_t Error code Note: The returned array is allocated by the library and should be freed using zvec_free() when no longer needed. The individual field pointers are owned by the schema and must NOT be freed.
-
zvec_collection_schema_get_forward_fields_with_index
@Cast("zvec_error_code_t") public static int zvec_collection_schema_get_forward_fields_with_index(@Const ZvecNative.zvec_collection_schema_t schema, @Cast("zvec_field_schema_t***") @ByPtrPtr org.bytedeco.javacpp.PointerPointer fields, @Cast("size_t*") org.bytedeco.javacpp.SizeTPointer count) Get all forward fields with index- Parameters:
schema- Collection schema pointerfields- [out] Receives a newly allocated array of pointers to field schemas. The array is allocated by the library and should be freed using zvec_free() when no longer needed.count- [out] Number of fields- Returns:
- zvec_error_code_t Error code Note: The returned array is allocated by the library and should be freed using zvec_free() when no longer needed. The individual field pointers are owned by the schema and must NOT be freed.
-
zvec_collection_schema_get_forward_field_names
@Cast("zvec_error_code_t") public static int zvec_collection_schema_get_forward_field_names(@Const ZvecNative.zvec_collection_schema_t schema, @Cast("const char***") @ByPtrPtr org.bytedeco.javacpp.PointerPointer names, @Cast("size_t*") org.bytedeco.javacpp.SizeTPointer count) Get all forward (scalar) field names- Parameters:
schema- Collection schema pointernames- [out] Output array of field names (allocated by library)count- [out] Number of field names- Returns:
- zvec_error_code_t Error code Note: The returned array is allocated by the library and should be freed using zvec_free() when no longer needed. The individual string pointers are owned by the schema and must NOT be freed.
-
zvec_collection_schema_get_forward_field_names_with_index
@Cast("zvec_error_code_t") public static int zvec_collection_schema_get_forward_field_names_with_index(@Const ZvecNative.zvec_collection_schema_t schema, @Cast("const char***") @ByPtrPtr org.bytedeco.javacpp.PointerPointer names, @Cast("size_t*") org.bytedeco.javacpp.SizeTPointer count) Get all forward field names with index- Parameters:
schema- Collection schema pointernames- [out] Output array of field names (allocated by library)count- [out] Number of field names- Returns:
- zvec_error_code_t Error code Note: The returned array is allocated by the library and should be freed using zvec_free() when no longer needed. The individual string pointers are owned by the schema and must NOT be freed.
-
zvec_collection_schema_get_all_field_names
@Cast("zvec_error_code_t") public static int zvec_collection_schema_get_all_field_names(@Const ZvecNative.zvec_collection_schema_t schema, @Cast("const char***") @ByPtrPtr org.bytedeco.javacpp.PointerPointer names, @Cast("size_t*") org.bytedeco.javacpp.SizeTPointer count) Get all field names- Parameters:
schema- Collection schema pointernames- [out] Output array of field names (allocated by library)count- [out] Number of field names- Returns:
- zvec_error_code_t Error code Note: The returned array is allocated by the library and should be freed using zvec_free() when no longer needed. The individual string pointers are owned by the schema and must NOT be freed.
-
zvec_collection_schema_get_vector_fields
@Cast("zvec_error_code_t") public static int zvec_collection_schema_get_vector_fields(@Const ZvecNative.zvec_collection_schema_t schema, @Cast("zvec_field_schema_t***") @ByPtrPtr org.bytedeco.javacpp.PointerPointer fields, @Cast("size_t*") org.bytedeco.javacpp.SizeTPointer count) Get all vector fields- Parameters:
schema- Collection schema pointerfields- [out] Receives a newly allocated array of pointers to field schemas. The array is allocated by the library and should be freed using zvec_free() when no longer needed.count- [out] Number of fields- Returns:
- zvec_error_code_t Error code Note: The returned array is allocated by the library and should be freed using zvec_free() when no longer needed. The individual field pointers are owned by the schema and must NOT be freed.
-
zvec_collection_schema_get_max_doc_count_per_segment
@Cast("uint64_t") public static long zvec_collection_schema_get_max_doc_count_per_segment(@Const ZvecNative.zvec_collection_schema_t schema) Get maximum document count per segment of collection schema- Parameters:
schema- Collection schema pointer- Returns:
- uint64_t Maximum document count per segment
-
zvec_collection_schema_set_max_doc_count_per_segment
@Cast("zvec_error_code_t") public static int zvec_collection_schema_set_max_doc_count_per_segment(ZvecNative.zvec_collection_schema_t schema, @Cast("uint64_t") long max_doc_count) Set maximum document count per segment- Parameters:
schema- Collection schema pointermax_doc_count- Maximum document count- Returns:
- zvec_error_code_t Error code
-
zvec_collection_schema_validate
@Cast("zvec_error_code_t") public static int zvec_collection_schema_validate(@Const ZvecNative.zvec_collection_schema_t schema, @Cast("zvec_string_t**") org.bytedeco.javacpp.PointerPointer error_msg) Validate collection schema- Parameters:
schema- Collection schema pointererror_msg- [out] Error message (needs to be freed by calling zvec_free_string)- Returns:
- zvec_error_code_t Error code
-
zvec_collection_schema_validate
@Cast("zvec_error_code_t") public static int zvec_collection_schema_validate(@Const ZvecNative.zvec_collection_schema_t schema, @ByPtrPtr ZvecNative.zvec_string_t error_msg) -
zvec_collection_schema_add_index
@Cast("zvec_error_code_t") public static int zvec_collection_schema_add_index(ZvecNative.zvec_collection_schema_t schema, @Cast("const char*") org.bytedeco.javacpp.BytePointer field_name, @Const ZvecNative.zvec_index_params_t index_params) Add index to field- Parameters:
schema- Collection schema pointerfield_name- Field name to add index toindex_params- Index parameters- Returns:
- zvec_error_code_t Error code
-
zvec_collection_schema_add_index
@Cast("zvec_error_code_t") public static int zvec_collection_schema_add_index(ZvecNative.zvec_collection_schema_t schema, String field_name, @Const ZvecNative.zvec_index_params_t index_params) -
zvec_collection_schema_drop_index
@Cast("zvec_error_code_t") public static int zvec_collection_schema_drop_index(ZvecNative.zvec_collection_schema_t schema, @Cast("const char*") org.bytedeco.javacpp.BytePointer field_name) Drop index from field- Parameters:
schema- Collection schema pointerfield_name- Field name to drop index from- Returns:
- zvec_error_code_t Error code
-
zvec_collection_schema_drop_index
@Cast("zvec_error_code_t") public static int zvec_collection_schema_drop_index(ZvecNative.zvec_collection_schema_t schema, String field_name) -
zvec_collection_schema_has_index
@Cast("bool") public static boolean zvec_collection_schema_has_index(@Const ZvecNative.zvec_collection_schema_t schema, @Cast("const char*") org.bytedeco.javacpp.BytePointer field_name) Check if field has index- Parameters:
schema- Collection schema pointerfield_name- Field name- Returns:
- true if field has index, false otherwise
-
zvec_collection_schema_has_index
@Cast("bool") public static boolean zvec_collection_schema_has_index(@Const ZvecNative.zvec_collection_schema_t schema, String field_name) -
zvec_collection_create_and_open
@Cast("zvec_error_code_t") public static int zvec_collection_create_and_open(@Cast("const char*") org.bytedeco.javacpp.BytePointer path, @Const ZvecNative.zvec_collection_schema_t schema, @Const ZvecNative.zvec_collection_options_t options, @Cast("zvec_collection_t**") org.bytedeco.javacpp.PointerPointer collection) Create and open collection- Parameters:
path- Collection pathschema- Collection schema pointeroptions- Collection options pointer (NULL uses default options)collection- [out] Returned collection handle- Returns:
- zvec_error_code_t Error code
-
zvec_collection_create_and_open
@Cast("zvec_error_code_t") public static int zvec_collection_create_and_open(@Cast("const char*") org.bytedeco.javacpp.BytePointer path, @Const ZvecNative.zvec_collection_schema_t schema, @Const ZvecNative.zvec_collection_options_t options, @ByPtrPtr ZvecNative.zvec_collection_t collection) -
zvec_collection_create_and_open
@Cast("zvec_error_code_t") public static int zvec_collection_create_and_open(String path, @Const ZvecNative.zvec_collection_schema_t schema, @Const ZvecNative.zvec_collection_options_t options, @ByPtrPtr ZvecNative.zvec_collection_t collection) -
zvec_collection_open
@Cast("zvec_error_code_t") public static int zvec_collection_open(@Cast("const char*") org.bytedeco.javacpp.BytePointer path, @Const ZvecNative.zvec_collection_options_t options, @Cast("zvec_collection_t**") org.bytedeco.javacpp.PointerPointer collection) Open existing collection- Parameters:
path- Collection pathoptions- Collection options pointer (NULL uses default options)collection- [out] Returned collection handle- Returns:
- zvec_error_code_t Error code
-
zvec_collection_open
@Cast("zvec_error_code_t") public static int zvec_collection_open(@Cast("const char*") org.bytedeco.javacpp.BytePointer path, @Const ZvecNative.zvec_collection_options_t options, @ByPtrPtr ZvecNative.zvec_collection_t collection) -
zvec_collection_open
@Cast("zvec_error_code_t") public static int zvec_collection_open(String path, @Const ZvecNative.zvec_collection_options_t options, @ByPtrPtr ZvecNative.zvec_collection_t collection) -
zvec_collection_close
@Cast("zvec_error_code_t") public static int zvec_collection_close(ZvecNative.zvec_collection_t collection) Close collection Only releases this handle; the collection itself closes once the last handle is released, waiting for any open iterators first.- Parameters:
collection- Collection handle- Returns:
- zvec_error_code_t Error code
-
zvec_collection_destroy
@Cast("zvec_error_code_t") public static int zvec_collection_destroy(ZvecNative.zvec_collection_t collection) Destroy collection- Parameters:
collection- Collection handle- Returns:
- zvec_error_code_t Error code
-
zvec_collection_flush
@Cast("zvec_error_code_t") public static int zvec_collection_flush(ZvecNative.zvec_collection_t collection) Flush collection data to disk- Parameters:
collection- Collection handle- Returns:
- zvec_error_code_t Error code
-
zvec_collection_get_schema
@Cast("zvec_error_code_t") public static int zvec_collection_get_schema(@Const ZvecNative.zvec_collection_t collection, @Cast("zvec_collection_schema_t**") org.bytedeco.javacpp.PointerPointer schema) Get collection schema- Parameters:
collection- Collection handleschema- [out] Returned collection schema pointer (needs to be freed by calling zvec_collection_schema_destroy)- Returns:
- zvec_error_code_t Error code
-
zvec_collection_get_schema
@Cast("zvec_error_code_t") public static int zvec_collection_get_schema(@Const ZvecNative.zvec_collection_t collection, @ByPtrPtr ZvecNative.zvec_collection_schema_t schema) -
zvec_collection_get_options
@Cast("zvec_error_code_t") public static int zvec_collection_get_options(@Const ZvecNative.zvec_collection_t collection, @Cast("zvec_collection_options_t**") org.bytedeco.javacpp.PointerPointer options) Get collection options- Parameters:
collection- Collection handleoptions- [out] Returned collection options pointer (needs to be freed by calling zvec_collection_options_destroy)- Returns:
- zvec_error_code_t Error code
-
zvec_collection_get_options
@Cast("zvec_error_code_t") public static int zvec_collection_get_options(@Const ZvecNative.zvec_collection_t collection, @ByPtrPtr ZvecNative.zvec_collection_options_t options) -
zvec_collection_get_stats
@Cast("zvec_error_code_t") public static int zvec_collection_get_stats(@Const ZvecNative.zvec_collection_t collection, @Cast("zvec_collection_stats_t**") org.bytedeco.javacpp.PointerPointer stats) Get collection statistics- Parameters:
collection- Collection handlestats- [out] Returned statistics pointer (needs to be freed by calling zvec_collection_stats_destroy)- Returns:
- zvec_error_code_t Error code
-
zvec_collection_get_stats
@Cast("zvec_error_code_t") public static int zvec_collection_get_stats(@Const ZvecNative.zvec_collection_t collection, @ByPtrPtr ZvecNative.zvec_collection_stats_t stats) -
zvec_collection_stats_destroy
Destroy collection statistics- Parameters:
stats- Statistics pointer
-
zvec_free_field_schema
Free field schema memory- Parameters:
field_schema- Field schema pointer to be freed
-
zvec_collection_create_index
@Cast("zvec_error_code_t") public static int zvec_collection_create_index(ZvecNative.zvec_collection_t collection, @Cast("const char*") org.bytedeco.javacpp.BytePointer field_name, @Const ZvecNative.zvec_index_params_t index_params) Create index for a collection field- Parameters:
collection- Collection handlefield_name- Field name to create index onindex_params- Index parameters. The function will make an internal copy of the parameters, so the caller retains ownership and should call zvec_index_params_destroy() after the call.- Returns:
- zvec_error_code_t Error code
-
zvec_collection_create_index
@Cast("zvec_error_code_t") public static int zvec_collection_create_index(ZvecNative.zvec_collection_t collection, String field_name, @Const ZvecNative.zvec_index_params_t index_params) -
zvec_collection_drop_index
@Cast("zvec_error_code_t") public static int zvec_collection_drop_index(ZvecNative.zvec_collection_t collection, @Cast("const char*") org.bytedeco.javacpp.BytePointer field_name) Drop index- Parameters:
collection- Collection handlefield_name- Field name- Returns:
- zvec_error_code_t Error code
-
zvec_collection_drop_index
@Cast("zvec_error_code_t") public static int zvec_collection_drop_index(ZvecNative.zvec_collection_t collection, String field_name) -
zvec_collection_optimize
@Cast("zvec_error_code_t") public static int zvec_collection_optimize(ZvecNative.zvec_collection_t collection) Optimize collection (rebuild indexes, merge segments, etc.)- Parameters:
collection- Collection handle- Returns:
- zvec_error_code_t Error code
-
zvec_collection_add_column
@Cast("zvec_error_code_t") public static int zvec_collection_add_column(ZvecNative.zvec_collection_t collection, @Const ZvecNative.zvec_field_schema_t field_schema, @Cast("const char*") org.bytedeco.javacpp.BytePointer expression) Add column- Parameters:
collection- Collection handlefield_schema- Field schema pointer (deep-copied internally, caller retains ownership and must call zvec_field_schema_destroy after the call)expression- Default value expression (can be NULL)- Returns:
- zvec_error_code_t Error code
-
zvec_collection_add_column
@Cast("zvec_error_code_t") public static int zvec_collection_add_column(ZvecNative.zvec_collection_t collection, @Const ZvecNative.zvec_field_schema_t field_schema, String expression) -
zvec_collection_drop_column
@Cast("zvec_error_code_t") public static int zvec_collection_drop_column(ZvecNative.zvec_collection_t collection, @Cast("const char*") org.bytedeco.javacpp.BytePointer column_name) Drop column- Parameters:
collection- Collection handlecolumn_name- Field name- Returns:
- zvec_error_code_t Error code
-
zvec_collection_drop_column
@Cast("zvec_error_code_t") public static int zvec_collection_drop_column(ZvecNative.zvec_collection_t collection, String column_name) -
zvec_collection_alter_column
@Cast("zvec_error_code_t") public static int zvec_collection_alter_column(ZvecNative.zvec_collection_t collection, @Cast("const char*") org.bytedeco.javacpp.BytePointer column_name, @Cast("const char*") org.bytedeco.javacpp.BytePointer new_name, @Const ZvecNative.zvec_field_schema_t new_schema) Alter column- Parameters:
collection- Collection handlecolumn_name- Column/field name to alternew_name- New field name (can be NULL to indicate no renaming)new_schema- New field schema (can be NULL to indicate no schema modification). The schema is deep-copied internally, caller retains ownership and must call zvec_field_schema_destroy after the call.- Returns:
- zvec_error_code_t Error code
-
zvec_collection_alter_column
@Cast("zvec_error_code_t") public static int zvec_collection_alter_column(ZvecNative.zvec_collection_t collection, String column_name, String new_name, @Const ZvecNative.zvec_field_schema_t new_schema) -
zvec_collection_insert
@Cast("zvec_error_code_t") public static int zvec_collection_insert(ZvecNative.zvec_collection_t collection, @Cast("const zvec_doc_t**") org.bytedeco.javacpp.PointerPointer docs, @Cast("size_t") long doc_count, @Cast("size_t*") org.bytedeco.javacpp.SizeTPointer success_count, @Cast("size_t*") org.bytedeco.javacpp.SizeTPointer error_count) Insert documents into collection- Parameters:
collection- Collection handledocs- Document arraydoc_count- Document countsuccess_count- [out] Number of successfully inserted documentserror_count- [out] Number of failed insertions- Returns:
- zvec_error_code_t Error code
-
zvec_collection_insert
@Cast("zvec_error_code_t") public static int zvec_collection_insert(ZvecNative.zvec_collection_t collection, @Const @ByPtrPtr ZvecNative.zvec_doc_t docs, @Cast("size_t") long doc_count, @Cast("size_t*") org.bytedeco.javacpp.SizeTPointer success_count, @Cast("size_t*") org.bytedeco.javacpp.SizeTPointer error_count) -
zvec_collection_insert_with_results
@Cast("zvec_error_code_t") public static int zvec_collection_insert_with_results(ZvecNative.zvec_collection_t collection, @Cast("const zvec_doc_t**") org.bytedeco.javacpp.PointerPointer docs, @Cast("size_t") long doc_count, @Cast("zvec_write_result_t**") org.bytedeco.javacpp.PointerPointer results, @Cast("size_t*") org.bytedeco.javacpp.SizeTPointer result_count) Insert documents and return per-document statuses.- Parameters:
collection- Collection handledocs- Document arraydoc_count- Document countresults- [out] Per-document result array (free with zvec_write_results_free)result_count- [out] Number of result entries- Returns:
- zvec_error_code_t Error code
-
zvec_collection_insert_with_results
@Cast("zvec_error_code_t") public static int zvec_collection_insert_with_results(ZvecNative.zvec_collection_t collection, @Const @ByPtrPtr ZvecNative.zvec_doc_t docs, @Cast("size_t") long doc_count, @ByPtrPtr ZvecNative.zvec_write_result_t results, @Cast("size_t*") org.bytedeco.javacpp.SizeTPointer result_count) -
zvec_collection_update
@Cast("zvec_error_code_t") public static int zvec_collection_update(ZvecNative.zvec_collection_t collection, @Cast("const zvec_doc_t**") org.bytedeco.javacpp.PointerPointer docs, @Cast("size_t") long doc_count, @Cast("size_t*") org.bytedeco.javacpp.SizeTPointer success_count, @Cast("size_t*") org.bytedeco.javacpp.SizeTPointer error_count) Update documents in collection- Parameters:
collection- Collection handledocs- Document arraydoc_count- Document countsuccess_count- [out] Number of successfully updated documentserror_count- [out] Number of failed updates- Returns:
- zvec_error_code_t Error code
-
zvec_collection_update
@Cast("zvec_error_code_t") public static int zvec_collection_update(ZvecNative.zvec_collection_t collection, @Const @ByPtrPtr ZvecNative.zvec_doc_t docs, @Cast("size_t") long doc_count, @Cast("size_t*") org.bytedeco.javacpp.SizeTPointer success_count, @Cast("size_t*") org.bytedeco.javacpp.SizeTPointer error_count) -
zvec_collection_update_with_results
@Cast("zvec_error_code_t") public static int zvec_collection_update_with_results(ZvecNative.zvec_collection_t collection, @Cast("const zvec_doc_t**") org.bytedeco.javacpp.PointerPointer docs, @Cast("size_t") long doc_count, @Cast("zvec_write_result_t**") org.bytedeco.javacpp.PointerPointer results, @Cast("size_t*") org.bytedeco.javacpp.SizeTPointer result_count) Update documents and return per-document statuses.- Parameters:
collection- Collection handledocs- Document arraydoc_count- Document countresults- [out] Per-document result array (free with zvec_write_results_free)result_count- [out] Number of result entries- Returns:
- zvec_error_code_t Error code
-
zvec_collection_update_with_results
@Cast("zvec_error_code_t") public static int zvec_collection_update_with_results(ZvecNative.zvec_collection_t collection, @Const @ByPtrPtr ZvecNative.zvec_doc_t docs, @Cast("size_t") long doc_count, @ByPtrPtr ZvecNative.zvec_write_result_t results, @Cast("size_t*") org.bytedeco.javacpp.SizeTPointer result_count) -
zvec_collection_upsert
@Cast("zvec_error_code_t") public static int zvec_collection_upsert(ZvecNative.zvec_collection_t collection, @Cast("const zvec_doc_t**") org.bytedeco.javacpp.PointerPointer docs, @Cast("size_t") long doc_count, @Cast("size_t*") org.bytedeco.javacpp.SizeTPointer success_count, @Cast("size_t*") org.bytedeco.javacpp.SizeTPointer error_count) Insert or update documents in collection (upsert operation)- Parameters:
collection- Collection handledocs- Document arraydoc_count- Document countsuccess_count- [out] Number of successful operationserror_count- [out] Number of failed operations- Returns:
- zvec_error_code_t Error code
-
zvec_collection_upsert
@Cast("zvec_error_code_t") public static int zvec_collection_upsert(ZvecNative.zvec_collection_t collection, @Const @ByPtrPtr ZvecNative.zvec_doc_t docs, @Cast("size_t") long doc_count, @Cast("size_t*") org.bytedeco.javacpp.SizeTPointer success_count, @Cast("size_t*") org.bytedeco.javacpp.SizeTPointer error_count) -
zvec_collection_upsert_with_results
@Cast("zvec_error_code_t") public static int zvec_collection_upsert_with_results(ZvecNative.zvec_collection_t collection, @Cast("const zvec_doc_t**") org.bytedeco.javacpp.PointerPointer docs, @Cast("size_t") long doc_count, @Cast("zvec_write_result_t**") org.bytedeco.javacpp.PointerPointer results, @Cast("size_t*") org.bytedeco.javacpp.SizeTPointer result_count) Upsert documents and return per-document statuses.- Parameters:
collection- Collection handledocs- Document arraydoc_count- Document countresults- [out] Per-document result array (free with zvec_write_results_free)result_count- [out] Number of result entries- Returns:
- zvec_error_code_t Error code
-
zvec_collection_upsert_with_results
@Cast("zvec_error_code_t") public static int zvec_collection_upsert_with_results(ZvecNative.zvec_collection_t collection, @Const @ByPtrPtr ZvecNative.zvec_doc_t docs, @Cast("size_t") long doc_count, @ByPtrPtr ZvecNative.zvec_write_result_t results, @Cast("size_t*") org.bytedeco.javacpp.SizeTPointer result_count) -
zvec_collection_delete
@Cast("zvec_error_code_t") public static int zvec_collection_delete(ZvecNative.zvec_collection_t collection, @Cast("const char*const*") org.bytedeco.javacpp.PointerPointer pks, @Cast("size_t") long pk_count, @Cast("size_t*") org.bytedeco.javacpp.SizeTPointer success_count, @Cast("size_t*") org.bytedeco.javacpp.SizeTPointer error_count) Delete documents from collection- Parameters:
collection- Collection handlepks- Primary key arraypk_count- Primary key countsuccess_count- [out] Number of successfully deleted documentserror_count- [out] Number of failed deletions- Returns:
- zvec_error_code_t Error code
-
zvec_collection_delete
@Cast("zvec_error_code_t") public static int zvec_collection_delete(ZvecNative.zvec_collection_t collection, @Cast("const char*const*") @ByPtrPtr org.bytedeco.javacpp.BytePointer pks, @Cast("size_t") long pk_count, @Cast("size_t*") org.bytedeco.javacpp.SizeTPointer success_count, @Cast("size_t*") org.bytedeco.javacpp.SizeTPointer error_count) -
zvec_collection_delete
@Cast("zvec_error_code_t") public static int zvec_collection_delete(ZvecNative.zvec_collection_t collection, @Cast("const char*const*") @ByPtrPtr ByteBuffer pks, @Cast("size_t") long pk_count, @Cast("size_t*") org.bytedeco.javacpp.SizeTPointer success_count, @Cast("size_t*") org.bytedeco.javacpp.SizeTPointer error_count) -
zvec_collection_delete
@Cast("zvec_error_code_t") public static int zvec_collection_delete(ZvecNative.zvec_collection_t collection, @Cast("const char*const*") @ByPtrPtr byte[] pks, @Cast("size_t") long pk_count, @Cast("size_t*") org.bytedeco.javacpp.SizeTPointer success_count, @Cast("size_t*") org.bytedeco.javacpp.SizeTPointer error_count) -
zvec_collection_delete_with_results
@Cast("zvec_error_code_t") public static int zvec_collection_delete_with_results(ZvecNative.zvec_collection_t collection, @Cast("const char*const*") org.bytedeco.javacpp.PointerPointer pks, @Cast("size_t") long pk_count, @Cast("zvec_write_result_t**") org.bytedeco.javacpp.PointerPointer results, @Cast("size_t*") org.bytedeco.javacpp.SizeTPointer result_count) Delete documents by PK and return per-document statuses.- Parameters:
collection- Collection handlepks- Primary key arraypk_count- Primary key countresults- [out] Per-document result array (free with zvec_write_results_free)result_count- [out] Number of result entries- Returns:
- zvec_error_code_t Error code
-
zvec_collection_delete_with_results
@Cast("zvec_error_code_t") public static int zvec_collection_delete_with_results(ZvecNative.zvec_collection_t collection, @Cast("const char*const*") @ByPtrPtr org.bytedeco.javacpp.BytePointer pks, @Cast("size_t") long pk_count, @ByPtrPtr ZvecNative.zvec_write_result_t results, @Cast("size_t*") org.bytedeco.javacpp.SizeTPointer result_count) -
zvec_collection_delete_with_results
@Cast("zvec_error_code_t") public static int zvec_collection_delete_with_results(ZvecNative.zvec_collection_t collection, @Cast("const char*const*") @ByPtrPtr ByteBuffer pks, @Cast("size_t") long pk_count, @ByPtrPtr ZvecNative.zvec_write_result_t results, @Cast("size_t*") org.bytedeco.javacpp.SizeTPointer result_count) -
zvec_collection_delete_with_results
@Cast("zvec_error_code_t") public static int zvec_collection_delete_with_results(ZvecNative.zvec_collection_t collection, @Cast("const char*const*") @ByPtrPtr byte[] pks, @Cast("size_t") long pk_count, @ByPtrPtr ZvecNative.zvec_write_result_t results, @Cast("size_t*") org.bytedeco.javacpp.SizeTPointer result_count) -
zvec_write_results_free
public static void zvec_write_results_free(ZvecNative.zvec_write_result_t results, @Cast("size_t") long result_count) Free result arrays returned by detailed DML APIs.- Parameters:
results- Result array pointerresult_count- Number of entries in result array
-
zvec_collection_delete_by_filter
@Cast("zvec_error_code_t") public static int zvec_collection_delete_by_filter(ZvecNative.zvec_collection_t collection, @Cast("const char*") org.bytedeco.javacpp.BytePointer filter) Delete documents by filter condition- Parameters:
collection- Collection handlefilter- Filter expressiondeleted_count- [out] Number of deleted documents- Returns:
- zvec_error_code_t Error code
-
zvec_collection_delete_by_filter
@Cast("zvec_error_code_t") public static int zvec_collection_delete_by_filter(ZvecNative.zvec_collection_t collection, String filter) -
zvec_collection_query
@Cast("zvec_error_code_t") public static int zvec_collection_query(@Const ZvecNative.zvec_collection_t collection, @Const ZvecNative.zvec_vector_query_t query, @Cast("zvec_doc_t***") @ByPtrPtr org.bytedeco.javacpp.PointerPointer results, @Cast("size_t*") org.bytedeco.javacpp.SizeTPointer result_count) Vector similarity search- Parameters:
collection- Collection handlequery- Query parameters pointerresults- [out] Returned document array (needs to be freed by calling zvec_docs_free)result_count- [out] Number of returned results- Returns:
- zvec_error_code_t Error code
-
zvec_collection_multi_query
@Cast("zvec_error_code_t") public static int zvec_collection_multi_query(@Const ZvecNative.zvec_collection_t collection, @Const ZvecNative.zvec_multi_query_t query, @Cast("zvec_doc_t***") @ByPtrPtr org.bytedeco.javacpp.PointerPointer results, @Cast("size_t*") org.bytedeco.javacpp.SizeTPointer result_count) Multi-query with multiple sub-queries and re-ranking- Parameters:
collection- Collection handlequery- Multi-query query parameters pointerresults- [out] Returned document array (needs to be freed by calling zvec_docs_free)result_count- [out] Number of returned results- Returns:
- zvec_error_code_t Error code
-
zvec_collection_fetch
@Cast("zvec_error_code_t") public static int zvec_collection_fetch(ZvecNative.zvec_collection_t collection, @Cast("const char*const*") org.bytedeco.javacpp.PointerPointer primary_keys, @Cast("size_t") long count, @Cast("const char*const*") org.bytedeco.javacpp.PointerPointer output_fields, @Cast("size_t") long output_field_count, @Cast("bool") boolean include_vector, @Cast("zvec_doc_t***") @ByPtrPtr org.bytedeco.javacpp.PointerPointer documents, @Cast("size_t*") org.bytedeco.javacpp.SizeTPointer found_count) Fetch documents by primary keys- Parameters:
collection- Collection handleprimary_keys- Primary key arraycount- Number of primary keysoutput_fields- Array of field names to return; NULL means return all fieldsoutput_field_count- Number of output_fields entries; 0 if output_fields is NULLinclude_vector- Whether to include vector data in resultsdocuments- [out] Returned document array (needs to be freed by calling zvec_docs_free)found_count- [out] Number of found documents- Returns:
- zvec_error_code_t Error code
-
zvec_collection_fetch
@Cast("zvec_error_code_t") public static int zvec_collection_fetch(ZvecNative.zvec_collection_t collection, @Cast("const char*const*") @ByPtrPtr org.bytedeco.javacpp.BytePointer primary_keys, @Cast("size_t") long count, @Cast("const char*const*") @ByPtrPtr org.bytedeco.javacpp.BytePointer output_fields, @Cast("size_t") long output_field_count, @Cast("bool") boolean include_vector, @Cast("zvec_doc_t***") @ByPtrPtr org.bytedeco.javacpp.PointerPointer documents, @Cast("size_t*") org.bytedeco.javacpp.SizeTPointer found_count) -
zvec_collection_fetch
@Cast("zvec_error_code_t") public static int zvec_collection_fetch(ZvecNative.zvec_collection_t collection, @Cast("const char*const*") @ByPtrPtr ByteBuffer primary_keys, @Cast("size_t") long count, @Cast("const char*const*") @ByPtrPtr ByteBuffer output_fields, @Cast("size_t") long output_field_count, @Cast("bool") boolean include_vector, @Cast("zvec_doc_t***") @ByPtrPtr org.bytedeco.javacpp.PointerPointer documents, @Cast("size_t*") org.bytedeco.javacpp.SizeTPointer found_count) -
zvec_collection_fetch
@Cast("zvec_error_code_t") public static int zvec_collection_fetch(ZvecNative.zvec_collection_t collection, @Cast("const char*const*") @ByPtrPtr byte[] primary_keys, @Cast("size_t") long count, @Cast("const char*const*") @ByPtrPtr byte[] output_fields, @Cast("size_t") long output_field_count, @Cast("bool") boolean include_vector, @Cast("zvec_doc_t***") @ByPtrPtr org.bytedeco.javacpp.PointerPointer documents, @Cast("size_t*") org.bytedeco.javacpp.SizeTPointer found_count) -
zvec_iterator_options_create
Create an iterator options object with default values (output_fields = all, include_vector = true).- Returns:
- Options handle, or NULL on allocation failure.
-
zvec_iterator_options_destroy
Destroy an iterator options object.- Parameters:
options- Options handle (may be NULL).
-
zvec_iterator_options_set_output_fields
@Cast("zvec_error_code_t") public static int zvec_iterator_options_set_output_fields(ZvecNative.zvec_iterator_options_t options, @Cast("const char*const*") org.bytedeco.javacpp.PointerPointer output_fields, @Cast("size_t") long count) Set the scalar fields to return.- Parameters:
options- Options handleoutput_fields- Array of field names; NULL means return all fieldscount- Number of entries in output_fields. If output_fields is non-NULL and count is 0, no scalar fields are returned (only the primary key / system columns).- Returns:
- zvec_error_code_t Error code
-
zvec_iterator_options_set_output_fields
@Cast("zvec_error_code_t") public static int zvec_iterator_options_set_output_fields(ZvecNative.zvec_iterator_options_t options, @Cast("const char*const*") @ByPtrPtr org.bytedeco.javacpp.BytePointer output_fields, @Cast("size_t") long count) -
zvec_iterator_options_set_output_fields
@Cast("zvec_error_code_t") public static int zvec_iterator_options_set_output_fields(ZvecNative.zvec_iterator_options_t options, @Cast("const char*const*") @ByPtrPtr ByteBuffer output_fields, @Cast("size_t") long count) -
zvec_iterator_options_set_output_fields
@Cast("zvec_error_code_t") public static int zvec_iterator_options_set_output_fields(ZvecNative.zvec_iterator_options_t options, @Cast("const char*const*") @ByPtrPtr byte[] output_fields, @Cast("size_t") long count) -
zvec_iterator_options_set_include_vector
@Cast("zvec_error_code_t") public static int zvec_iterator_options_set_include_vector(ZvecNative.zvec_iterator_options_t options, @Cast("bool") boolean include) Set whether to include vector fields in the returned documents.- Parameters:
options- Options handleinclude- true to include vectors, false to skip them- Returns:
- zvec_error_code_t Error code
-
zvec_collection_create_iterator
@Cast("zvec_error_code_t") public static int zvec_collection_create_iterator(ZvecNative.zvec_collection_t collection, @Const ZvecNative.zvec_iterator_options_t options, @Cast("zvec_doc_iterator_t**") org.bytedeco.javacpp.PointerPointer out_iter) Create a document iterator over the collection. Takes an isolated snapshot at call time. On a writable collection this seals the current writing segment (each call may produce a new small segment); read-only collections are scanned without any write. While any iterator is open, schema changes (create/drop index, add/alter/drop column) and destroy return an error, and optimize fails at its start; conversely this call fails while a maintenance operation (optimize, schema DDL or destroy) is running. Flush, writes and queries are not affected. zvec_collection_close() only releases the handle: the collection itself closes when the last handle is released, waiting for any open iterators first, so close every iterator (zvec_doc_iterator_close) before releasing the last collection handle.- Parameters:
collection- Collection handleoptions- Iterator options (may be NULL to use defaults)out_iter- [out] Returned iterator handle (release with zvec_doc_iterator_close)- Returns:
- zvec_error_code_t Error code
-
zvec_collection_create_iterator
@Cast("zvec_error_code_t") public static int zvec_collection_create_iterator(ZvecNative.zvec_collection_t collection, @Const ZvecNative.zvec_iterator_options_t options, @ByPtrPtr ZvecNative.zvec_doc_iterator_t out_iter) -
zvec_doc_iterator_next
@Cast("zvec_error_code_t") public static int zvec_doc_iterator_next(ZvecNative.zvec_doc_iterator_t iter, @Cast("zvec_doc_t**") org.bytedeco.javacpp.PointerPointer out_doc) Advance the iterator and return the next document.- Parameters:
iter- Iterator handleout_doc- [out] Returned document (release with zvec_doc_destroy). Set to NULL when iteration reaches the end (EOF).- Returns:
- zvec_error_code_t ZVEC_OK on success or EOF; error code otherwise.
-
zvec_doc_iterator_next
@Cast("zvec_error_code_t") public static int zvec_doc_iterator_next(ZvecNative.zvec_doc_iterator_t iter, @ByPtrPtr ZvecNative.zvec_doc_t out_doc) -
zvec_doc_iterator_close
Close the iterator and release all its resources.- Parameters:
iter- Iterator handle (may be NULL).
-
zvec_doc_create
Create a new document object- Returns:
- zvec_doc_t* Pointer to the newly created document object, returns NULL on failure
-
zvec_doc_destroy
Destroy the document object and release all resources- Parameters:
doc- Pointer to the document object
-
zvec_doc_clear
Clear the document object- Parameters:
doc- Pointer to the document object
-
zvec_doc_add_field_by_value
@Cast("zvec_error_code_t") public static int zvec_doc_add_field_by_value(ZvecNative.zvec_doc_t doc, @Cast("const char*") org.bytedeco.javacpp.BytePointer field_name, @Cast("zvec_data_type_t") int data_type, @Const org.bytedeco.javacpp.Pointer value, @Cast("size_t") long value_size) Add field to document by value- Parameters:
doc- Document object pointerfield_name- Field namedata_type- Data typevalue- Value pointervalue_size- Value size- Returns:
- zvec_error_code_t Error code
-
zvec_doc_add_field_by_value
@Cast("zvec_error_code_t") public static int zvec_doc_add_field_by_value(ZvecNative.zvec_doc_t doc, String field_name, @Cast("zvec_data_type_t") int data_type, @Const org.bytedeco.javacpp.Pointer value, @Cast("size_t") long value_size) -
zvec_doc_add_field_by_struct
@Cast("zvec_error_code_t") public static int zvec_doc_add_field_by_struct(ZvecNative.zvec_doc_t doc, @Const ZvecNative.zvec_doc_field_t field) Add field to document by structure- Parameters:
doc- Document object pointerfield- Field structure pointer- Returns:
- zvec_error_code_t Error code
-
zvec_doc_remove_field
@Cast("zvec_error_code_t") public static int zvec_doc_remove_field(ZvecNative.zvec_doc_t doc, @Cast("const char*") org.bytedeco.javacpp.BytePointer field_name) Remove field from document- Parameters:
doc- Document structure pointerfield_name- Field name- Returns:
- zvec_error_code_t Error code
-
zvec_doc_remove_field
@Cast("zvec_error_code_t") public static int zvec_doc_remove_field(ZvecNative.zvec_doc_t doc, String field_name) -
zvec_docs_free
public static void zvec_docs_free(@Cast("zvec_doc_t**") org.bytedeco.javacpp.PointerPointer documents, @Cast("size_t") long count) Batch release document array- Parameters:
documents- Document pointer arraycount- Document count
-
zvec_docs_free
public static void zvec_docs_free(@ByPtrPtr ZvecNative.zvec_doc_t documents, @Cast("size_t") long count) -
zvec_doc_set_pk
public static void zvec_doc_set_pk(ZvecNative.zvec_doc_t doc, @Cast("const char*") org.bytedeco.javacpp.BytePointer pk) Set document primary key- Parameters:
doc- Pointer to the document structurepk- Primary key string
-
zvec_doc_set_pk
-
zvec_doc_set_doc_id
Set document ID- Parameters:
doc- Document structure pointerdoc_id- Document ID
-
zvec_doc_set_score
Set document score- Parameters:
doc- Document structure pointerscore- Score value
-
zvec_doc_set_operator
public static void zvec_doc_set_operator(ZvecNative.zvec_doc_t doc, @Cast("zvec_doc_operator_t") int op) Set document operator- Parameters:
doc- Document structure pointerop- Operator
-
zvec_doc_set_field_null
@Cast("zvec_error_code_t") public static int zvec_doc_set_field_null(ZvecNative.zvec_doc_t doc, @Cast("const char*") org.bytedeco.javacpp.BytePointer field_name) Explicitly mark a document field as null.- Parameters:
doc- Document structure pointerfield_name- Field name- Returns:
- zvec_error_code_t Error code
-
zvec_doc_set_field_null
@Cast("zvec_error_code_t") public static int zvec_doc_set_field_null(ZvecNative.zvec_doc_t doc, String field_name) -
zvec_doc_get_doc_id
Get document ID- Parameters:
doc- Document structure pointer- Returns:
- uint64_t Document ID
-
zvec_doc_get_score
Get document score- Parameters:
doc- Document structure pointer- Returns:
- float Score value
-
zvec_doc_get_operator
@Cast("zvec_doc_operator_t") public static int zvec_doc_get_operator(@Const ZvecNative.zvec_doc_t doc) Get document operator- Parameters:
doc- Document structure pointer- Returns:
- zvec_doc_operator_t Operator
-
zvec_doc_get_field_count
Get document field count- Parameters:
doc- Document structure pointer- Returns:
- size_t Field count
-
zvec_doc_get_pk_pointer
@Cast("const char*") public static org.bytedeco.javacpp.BytePointer zvec_doc_get_pk_pointer(@Const ZvecNative.zvec_doc_t doc) Get document primary key pointer (no copy)- Parameters:
doc- Document object pointer- Returns:
- const char* Primary key string pointer, returns NULL if not set
-
zvec_doc_get_pk_copy
@Cast("char*") public static org.bytedeco.javacpp.BytePointer zvec_doc_get_pk_copy(@Const ZvecNative.zvec_doc_t doc) Get document primary key copy (needs manual release)- Parameters:
doc- Document object pointer- Returns:
- const char* Primary key string copy, needs to call zvec_free() to release, returns NULL if not set Note: The returned string is allocated by the library and must be freed using zvec_free() when no longer needed.
-
zvec_doc_get_field_value_basic
@Cast("zvec_error_code_t") public static int zvec_doc_get_field_value_basic(@Const ZvecNative.zvec_doc_t doc, @Cast("const char*") org.bytedeco.javacpp.BytePointer field_name, @Cast("zvec_data_type_t") int field_type, org.bytedeco.javacpp.Pointer value_buffer, @Cast("size_t") long buffer_size) Get field value (basic type returned directly) Supports basic numeric data types: BOOL, INT32, INT64, UINT32, UINT64, FLOAT, DOUBLE. The value is copied directly into the provided buffer. For STRING, BINARY, and VECTOR types, use zvec_doc_get_field_value_copy or zvec_doc_get_field_value_pointer instead.- Parameters:
doc- Document object pointerfield_name- Field namefield_type- Field type (must be a basic numeric type)value_buffer- Output buffer to receive the valuebuffer_size- Size of the output buffer- Returns:
- zvec_error_code_t Error code
-
zvec_doc_get_field_value_basic
@Cast("zvec_error_code_t") public static int zvec_doc_get_field_value_basic(@Const ZvecNative.zvec_doc_t doc, String field_name, @Cast("zvec_data_type_t") int field_type, org.bytedeco.javacpp.Pointer value_buffer, @Cast("size_t") long buffer_size) -
zvec_doc_get_field_value_copy
@Cast("zvec_error_code_t") public static int zvec_doc_get_field_value_copy(@Const ZvecNative.zvec_doc_t doc, @Cast("const char*") org.bytedeco.javacpp.BytePointer field_name, @Cast("zvec_data_type_t") int field_type, @Cast("void**") org.bytedeco.javacpp.PointerPointer value, @Cast("size_t*") org.bytedeco.javacpp.SizeTPointer value_size) Get field value copy (allocate new memory) Supports all data types including: - Basic types: BOOL, INT32, INT64, UINT32, UINT64, FLOAT, DOUBLE - String types: STRING, BINARY - Vector types: VECTOR_FP32, VECTOR_FP64, VECTOR_FP16, VECTOR_INT4, VECTOR_INT8, VECTOR_INT16, VECTOR_BINARY32, VECTOR_BINARY64 - Sparse vector types: SPARSE_VECTOR_FP32, SPARSE_VECTOR_FP16 - Array types: ARRAY_STRING, ARRAY_BINARY, ARRAY_BOOL, ARRAY_INT32, ARRAY_INT64, ARRAY_UINT32, ARRAY_UINT64, ARRAY_FLOAT, ARRAY_DOUBLE The returned value pointer must be manually freed using appropriate deallocation functions (zvec_free() for basic types and strings, zvec_free_uint8_array() for binary data).- Parameters:
doc- Document object pointerfield_name- Field namefield_type- Field typevalue- [out] Returned value pointer (needs manual release)value_size- [out] Returned value size- Returns:
- zvec_error_code_t Error code
-
zvec_doc_get_field_value_copy
@Cast("zvec_error_code_t") public static int zvec_doc_get_field_value_copy(@Const ZvecNative.zvec_doc_t doc, @Cast("const char*") org.bytedeco.javacpp.BytePointer field_name, @Cast("zvec_data_type_t") int field_type, @Cast("void**") @ByPtrPtr org.bytedeco.javacpp.Pointer value, @Cast("size_t*") org.bytedeco.javacpp.SizeTPointer value_size) -
zvec_doc_get_field_value_copy
@Cast("zvec_error_code_t") public static int zvec_doc_get_field_value_copy(@Const ZvecNative.zvec_doc_t doc, String field_name, @Cast("zvec_data_type_t") int field_type, @Cast("void**") @ByPtrPtr org.bytedeco.javacpp.Pointer value, @Cast("size_t*") org.bytedeco.javacpp.SizeTPointer value_size) -
zvec_doc_get_field_value_pointer
@Cast("zvec_error_code_t") public static int zvec_doc_get_field_value_pointer(@Const ZvecNative.zvec_doc_t doc, @Cast("const char*") org.bytedeco.javacpp.BytePointer field_name, @Cast("zvec_data_type_t") int field_type, @Cast("const void**") org.bytedeco.javacpp.PointerPointer value, @Cast("size_t*") org.bytedeco.javacpp.SizeTPointer value_size) Get field value pointer (data remains in document) Supports data types where direct pointer access is safe: - Basic types: BOOL, INT32, INT64, UINT32, UINT64, FLOAT, DOUBLE - String types: STRING (returns null-terminated C string), BINARY - Vector types: VECTOR_FP32, VECTOR_FP64, VECTOR_FP16, VECTOR_INT4, VECTOR_INT8, VECTOR_INT16, VECTOR_BINARY32, VECTOR_BINARY64 - Array types: ARRAY_INT32, ARRAY_INT64, ARRAY_UINT32, ARRAY_UINT64, ARRAY_FLOAT, ARRAY_DOUBLE The returned pointer points to data within the document object and does not require manual memory management. The pointer remains valid as long as the document exists.- Parameters:
doc- Document object pointerfield_name- Field namefield_type- Field typevalue- [out] Returned value pointer (points to document-internal data)value_size- [out] Returned value size- Returns:
- zvec_error_code_t Error code
-
zvec_doc_get_field_value_pointer
@Cast("zvec_error_code_t") public static int zvec_doc_get_field_value_pointer(@Const ZvecNative.zvec_doc_t doc, @Cast("const char*") org.bytedeco.javacpp.BytePointer field_name, @Cast("zvec_data_type_t") int field_type, @Cast("const void**") @ByPtrPtr org.bytedeco.javacpp.Pointer value, @Cast("size_t*") org.bytedeco.javacpp.SizeTPointer value_size) -
zvec_doc_get_field_value_pointer
@Cast("zvec_error_code_t") public static int zvec_doc_get_field_value_pointer(@Const ZvecNative.zvec_doc_t doc, String field_name, @Cast("zvec_data_type_t") int field_type, @Cast("const void**") @ByPtrPtr org.bytedeco.javacpp.Pointer value, @Cast("size_t*") org.bytedeco.javacpp.SizeTPointer value_size) -
zvec_doc_is_empty
Check if document is empty- Parameters:
doc- Document object pointer- Returns:
- bool Returns true if document is empty, otherwise returns false
-
zvec_doc_has_field
@Cast("bool") public static boolean zvec_doc_has_field(@Const ZvecNative.zvec_doc_t doc, @Cast("const char*") org.bytedeco.javacpp.BytePointer field_name) Check if document contains specified field- Parameters:
doc- Document object pointerfield_name- Field name- Returns:
- bool Returns true if field exists, otherwise returns false
-
zvec_doc_has_field
@Cast("bool") public static boolean zvec_doc_has_field(@Const ZvecNative.zvec_doc_t doc, String field_name) -
zvec_doc_has_field_value
@Cast("bool") public static boolean zvec_doc_has_field_value(@Const ZvecNative.zvec_doc_t doc, @Cast("const char*") org.bytedeco.javacpp.BytePointer field_name) Check if document field has value- Parameters:
doc- Document object pointerfield_name- Field name- Returns:
- bool Returns true if field has value, otherwise returns false
-
zvec_doc_has_field_value
@Cast("bool") public static boolean zvec_doc_has_field_value(@Const ZvecNative.zvec_doc_t doc, String field_name) -
zvec_doc_is_field_null
@Cast("bool") public static boolean zvec_doc_is_field_null(@Const ZvecNative.zvec_doc_t doc, @Cast("const char*") org.bytedeco.javacpp.BytePointer field_name) Check if document field is null- Parameters:
doc- Document object pointerfield_name- Field name- Returns:
- bool Returns true if field is null, otherwise returns false
-
zvec_doc_is_field_null
@Cast("bool") public static boolean zvec_doc_is_field_null(@Const ZvecNative.zvec_doc_t doc, String field_name) -
zvec_doc_get_field_names
@Cast("zvec_error_code_t") public static int zvec_doc_get_field_names(@Const ZvecNative.zvec_doc_t doc, @Cast("char***") @ByPtrPtr org.bytedeco.javacpp.PointerPointer field_names, @Cast("size_t*") org.bytedeco.javacpp.SizeTPointer count) Get all field names of document- Parameters:
doc- Document object pointerfield_names- [out] Returned field name array (needs to call zvec_free_str_array to release)count- [out] Returned field count- Returns:
- zvec_error_code_t Error code
-
zvec_free_str_array
public static void zvec_free_str_array(@Cast("char**") org.bytedeco.javacpp.PointerPointer array, @Cast("size_t") long count) Release string array memory- Parameters:
array- String array pointercount- Array element count
-
zvec_free_str_array
public static void zvec_free_str_array(@Cast("char**") @ByPtrPtr org.bytedeco.javacpp.BytePointer array, @Cast("size_t") long count) -
zvec_free_str_array
public static void zvec_free_str_array(@Cast("char**") @ByPtrPtr ByteBuffer array, @Cast("size_t") long count) -
zvec_free_str_array
public static void zvec_free_str_array(@Cast("char**") @ByPtrPtr byte[] array, @Cast("size_t") long count) -
zvec_doc_serialize
@Cast("zvec_error_code_t") public static int zvec_doc_serialize(@Const ZvecNative.zvec_doc_t doc, @Cast("uint8_t**") org.bytedeco.javacpp.PointerPointer data, @Cast("size_t*") org.bytedeco.javacpp.SizeTPointer size) Serialize document- Parameters:
doc- Document object pointerdata- [out] Returned serialized data (needs to call zvec_free_uint8_array to release)size- [out] Returned data size- Returns:
- zvec_error_code_t Error code
-
zvec_doc_serialize
@Cast("zvec_error_code_t") public static int zvec_doc_serialize(@Const ZvecNative.zvec_doc_t doc, @Cast("uint8_t**") @ByPtrPtr org.bytedeco.javacpp.BytePointer data, @Cast("size_t*") org.bytedeco.javacpp.SizeTPointer size) -
zvec_doc_serialize
@Cast("zvec_error_code_t") public static int zvec_doc_serialize(@Const ZvecNative.zvec_doc_t doc, @Cast("uint8_t**") @ByPtrPtr ByteBuffer data, @Cast("size_t*") org.bytedeco.javacpp.SizeTPointer size) -
zvec_doc_serialize
@Cast("zvec_error_code_t") public static int zvec_doc_serialize(@Const ZvecNative.zvec_doc_t doc, @Cast("uint8_t**") @ByPtrPtr byte[] data, @Cast("size_t*") org.bytedeco.javacpp.SizeTPointer size) -
zvec_doc_deserialize
@Cast("zvec_error_code_t") public static int zvec_doc_deserialize(@Cast("const uint8_t*") org.bytedeco.javacpp.BytePointer data, @Cast("size_t") long size, @Cast("zvec_doc_t**") org.bytedeco.javacpp.PointerPointer doc) Deserialize document- Parameters:
data- Serialized datasize- Data sizedoc- [out] Returned document object pointer (needs to call zvec_doc_destroy to release)- Returns:
- zvec_error_code_t Error code
-
zvec_doc_deserialize
@Cast("zvec_error_code_t") public static int zvec_doc_deserialize(@Cast("const uint8_t*") org.bytedeco.javacpp.BytePointer data, @Cast("size_t") long size, @ByPtrPtr ZvecNative.zvec_doc_t doc) -
zvec_doc_deserialize
@Cast("zvec_error_code_t") public static int zvec_doc_deserialize(@Cast("const uint8_t*") ByteBuffer data, @Cast("size_t") long size, @ByPtrPtr ZvecNative.zvec_doc_t doc) -
zvec_doc_deserialize
@Cast("zvec_error_code_t") public static int zvec_doc_deserialize(@Cast("const uint8_t*") byte[] data, @Cast("size_t") long size, @ByPtrPtr ZvecNative.zvec_doc_t doc) -
zvec_doc_merge
Merge two documents- Parameters:
doc- Target document object pointerother- Source document object pointer
-
zvec_doc_memory_usage
Get document memory usage- Parameters:
doc- Document object pointer- Returns:
- size_t Memory usage (bytes)
-
zvec_doc_to_detail_string
@Cast("zvec_error_code_t") public static int zvec_doc_to_detail_string(@Const ZvecNative.zvec_doc_t doc, @Cast("char**") org.bytedeco.javacpp.PointerPointer detail_str) Get detailed string representation of document- Parameters:
doc- Document object pointerdetail_str- [out] Returned detailed string (needs manual release)- Returns:
- zvec_error_code_t Error code
-
zvec_doc_to_detail_string
@Cast("zvec_error_code_t") public static int zvec_doc_to_detail_string(@Const ZvecNative.zvec_doc_t doc, @Cast("char**") @ByPtrPtr org.bytedeco.javacpp.BytePointer detail_str) -
zvec_doc_to_detail_string
@Cast("zvec_error_code_t") public static int zvec_doc_to_detail_string(@Const ZvecNative.zvec_doc_t doc, @Cast("char**") @ByPtrPtr ByteBuffer detail_str) -
zvec_doc_to_detail_string
@Cast("zvec_error_code_t") public static int zvec_doc_to_detail_string(@Const ZvecNative.zvec_doc_t doc, @Cast("char**") @ByPtrPtr byte[] detail_str) -
zvec_error_code_to_string
@Cast("const char*") public static org.bytedeco.javacpp.BytePointer zvec_error_code_to_string(@Cast("zvec_error_code_t") int error_code) Convert error code to description string- Parameters:
error_code- Error code- Returns:
- const char* Error description string
-
zvec_data_type_to_string
@Cast("const char*") public static org.bytedeco.javacpp.BytePointer zvec_data_type_to_string(@Cast("zvec_data_type_t") int data_type) Convert data type to string- Parameters:
data_type- Data type- Returns:
- const char* Data type string
-
zvec_index_type_to_string
@Cast("const char*") public static org.bytedeco.javacpp.BytePointer zvec_index_type_to_string(@Cast("zvec_index_type_t") int index_type) Convert index type to string- Parameters:
index_type- Index type- Returns:
- const char* Index type string
-
zvec_metric_type_to_string
@Cast("const char*") public static org.bytedeco.javacpp.BytePointer zvec_metric_type_to_string(@Cast("zvec_metric_type_t") int metric_type) Convert metric type to string- Parameters:
metric_type- Metric type- Returns:
- const char* Metric type string
-