Enumerations and configuration
- group Enumerations and configuration
Enumerations, option structs, and value types used by the API.
Enums
-
enum LanceDBDistanceType
Distance type enum for vector search.
Values:
-
enumerator LANCEDB_DISTANCE_L2
-
enumerator LANCEDB_DISTANCE_COSINE
-
enumerator LANCEDB_DISTANCE_DOT
-
enumerator LANCEDB_DISTANCE_HAMMING
-
enumerator LANCEDB_DISTANCE_L2
-
enum LanceDBApproxMode
Speed and accuracy tradeoff for approximate vector search.
Values:
-
enumerator LANCEDB_APPROX_MODE_FAST
Prefer lower latency.
-
enumerator LANCEDB_APPROX_MODE_NORMAL
Use the default balance.
-
enumerator LANCEDB_APPROX_MODE_ACCURATE
Prefer higher recall.
-
enumerator LANCEDB_APPROX_MODE_FAST
-
enum LanceDBNormalizeMethod
Score normalization method for hybrid-search reranking.
LANCEDB_NORMALIZE_SCORE normalizes the raw vector distance and full-text score columns. LANCEDB_NORMALIZE_RANK converts them to ranks first. The SDK always normalizes the two channels before invoking the reranker; this enum selects what that normalization starts from.
Values:
-
enumerator LANCEDB_NORMALIZE_SCORE
-
enumerator LANCEDB_NORMALIZE_RANK
-
enumerator LANCEDB_NORMALIZE_SCORE
-
enum LanceDBQueryVectorType
Element type of one typed query vector.
LANCEDB_QUERY_VECTOR_F16 points at uint16_t IEEE-754 binary16 bit patterns. LANCEDB_QUERY_VECTOR_F32 points at float, LANCEDB_QUERY_VECTOR_F64 at double, and LANCEDB_QUERY_VECTOR_BINARY at uint8_t. The binary form widens each byte to its numeric Float32 value before it reaches the SDK; the bytes are not reinterpreted as floats.
Values:
-
enumerator LANCEDB_QUERY_VECTOR_F16
-
enumerator LANCEDB_QUERY_VECTOR_F32
-
enumerator LANCEDB_QUERY_VECTOR_F64
-
enumerator LANCEDB_QUERY_VECTOR_BINARY
-
enumerator LANCEDB_QUERY_VECTOR_F16
-
enum LanceDBIndexType
Index type enum.
Values:
-
enumerator LANCEDB_INDEX_AUTO
-
enumerator LANCEDB_INDEX_BTREE
-
enumerator LANCEDB_INDEX_BITMAP
-
enumerator LANCEDB_INDEX_LABELLIST
-
enumerator LANCEDB_INDEX_FTS
-
enumerator LANCEDB_INDEX_IVF_FLAT
-
enumerator LANCEDB_INDEX_IVF_PQ
-
enumerator LANCEDB_INDEX_IVF_HNSW_PQ
-
enumerator LANCEDB_INDEX_IVF_HNSW_SQ
-
enumerator LANCEDB_INDEX_AUTO
-
enum LanceDBOptimizeType
Optimize type enum.
Values:
-
enumerator LANCEDB_OPTIMIZE_ALL
-
enumerator LANCEDB_OPTIMIZE_COMPACT
-
enumerator LANCEDB_OPTIMIZE_PRUNE
-
enumerator LANCEDB_OPTIMIZE_INDEX
-
enumerator LANCEDB_OPTIMIZE_ALL
-
enum LanceDBBinaryOp
Binary operator enum for DataFusion expressions.
Values:
-
enumerator LANCEDB_BINARY_OP_EQ
-
enumerator LANCEDB_BINARY_OP_NOT_EQ
-
enumerator LANCEDB_BINARY_OP_LT
-
enumerator LANCEDB_BINARY_OP_LT_EQ
-
enumerator LANCEDB_BINARY_OP_GT
-
enumerator LANCEDB_BINARY_OP_GT_EQ
-
enumerator LANCEDB_BINARY_OP_AND
-
enumerator LANCEDB_BINARY_OP_OR
-
enumerator LANCEDB_BINARY_OP_PLUS
-
enumerator LANCEDB_BINARY_OP_MINUS
-
enumerator LANCEDB_BINARY_OP_MULTIPLY
-
enumerator LANCEDB_BINARY_OP_DIVIDE
-
enumerator LANCEDB_BINARY_OP_MODULO
-
enumerator LANCEDB_BINARY_OP_EQ
-
enum LanceDBBranchSourceKind
Source kind for lancedb_table_create_branch().
The kind selects which fields of LanceDBBranchSource are read. A version is resolved on the table handle’s current branch, a tag is global, and a branch may be used at its head or at a pinned version.
Values:
-
enumerator LANCEDB_BRANCH_SOURCE_VERSION
-
enumerator LANCEDB_BRANCH_SOURCE_TAG
-
enumerator LANCEDB_BRANCH_SOURCE_BRANCH
-
enumerator LANCEDB_BRANCH_SOURCE_VERSION
-
enum LanceDBCherryPickErrorCode
Reason the server gave for a blocked cherry-pick.
LANCEDB_CHERRY_PICK_ERROR_UNKNOWN is the SDK’s mapping for a code the pinned SDK does not recognize; the SDK does not expose the raw code.
Values:
-
enumerator LANCEDB_CHERRY_PICK_ERROR_BASE_MOVED
-
enumerator LANCEDB_CHERRY_PICK_ERROR_ROW_COUNT_MISMATCH
-
enumerator LANCEDB_CHERRY_PICK_ERROR_ROWS_CHANGED
-
enumerator LANCEDB_CHERRY_PICK_ERROR_COLUMN_REMOVED
-
enumerator LANCEDB_CHERRY_PICK_ERROR_COLUMN_CHANGED
-
enumerator LANCEDB_CHERRY_PICK_ERROR_NOTHING_TO_APPLY
-
enumerator LANCEDB_CHERRY_PICK_ERROR_NO_COLUMN_CHANGES
-
enumerator LANCEDB_CHERRY_PICK_ERROR_INPUT_COLUMN_DEPENDENCY
-
enumerator LANCEDB_CHERRY_PICK_ERROR_PARENT_NOT_MAIN
-
enumerator LANCEDB_CHERRY_PICK_ERROR_UNKNOWN
-
enumerator LANCEDB_CHERRY_PICK_ERROR_BASE_MOVED
-
enum LanceDBCherryPickStatus
Outcome reported by lancedb_table_cherry_pick().
LANCEDB_CHERRY_PICK_STATUS_UNKNOWN is the SDK’s mapping for a status the pinned SDK does not recognize; the SDK does not expose the raw status.
Values:
-
enumerator LANCEDB_CHERRY_PICK_STATUS_READY
-
enumerator LANCEDB_CHERRY_PICK_STATUS_FAILED
-
enumerator LANCEDB_CHERRY_PICK_STATUS_NOT_IMPLEMENTED
-
enumerator LANCEDB_CHERRY_PICK_STATUS_CHERRY_PICKED
-
enumerator LANCEDB_CHERRY_PICK_STATUS_UNKNOWN
-
enumerator LANCEDB_CHERRY_PICK_STATUS_READY
-
enum LanceDBDeltaRefType
Kind of endpoint a table delta compares.
Values:
-
enumerator LANCEDB_DELTA_REF_VERSION
-
enumerator LANCEDB_DELTA_REF_TAG
-
enumerator LANCEDB_DELTA_REF_VERSION
-
enum LanceDBReadConsistencyType
Read consistency mode reported by a connection.
LANCEDB_READ_CONSISTENCY_MANUAL means reads add no freshness constraint. LANCEDB_READ_CONSISTENCY_STRONG means reads request the latest data. LANCEDB_READ_CONSISTENCY_EVENTUAL means reads accept data within the configured freshness bound. Native tables may refresh in the background before the interval expires and refresh synchronously after it. Remote latest-timeline requests use the interval as a per-request minimum freshness bound; pinned snapshots omit that freshness routing header.
Values:
-
enumerator LANCEDB_READ_CONSISTENCY_MANUAL
-
enumerator LANCEDB_READ_CONSISTENCY_EVENTUAL
-
enumerator LANCEDB_READ_CONSISTENCY_STRONG
-
enumerator LANCEDB_READ_CONSISTENCY_MANUAL
-
struct LanceDBQueryVector
- #include <lancedb.h>
One typed query vector for lancedb_vector_query_new_typed() and lancedb_vector_query_add_query_vector().
This is a value description, not a builder handle.
datais borrowed for the duration of the call and copied before the function returns.dimensionis the number of elements indata; for LANCEDB_QUERY_VECTOR_BINARY it is the number of bytes. It must be greater than zero.
-
struct LanceDBVectorIndexConfig
- #include <lancedb.h>
Vector index configuration.
-
struct LanceDBScalarIndexConfig
- #include <lancedb.h>
Scalar index configuration.
-
struct LanceDBFtsIndexConfig
- #include <lancedb.h>
Full-text search index configuration.
-
struct LanceDBIndexOptions
- #include <lancedb.h>
Options for lancedb_table_create_index().
Initialize with lancedb_index_options_default() so every optional field stays unset instead of becoming an explicit zero or false. Numeric tuning fields use -1 for unset; 0 and positive values are forwarded to the SDK. Boolean tuning fields use -1 for unset, 0 for false and 1 for true. distance_type uses -1 for unset and otherwise takes a LanceDBDistanceType value.
Fields that do not apply to the selected index type are ignored. Strings are borrowed for the duration of the call.
-
struct LanceDBMergeInsertConfig
- #include <lancedb.h>
Merge insert configuration.
The conditions restricting which matched records are updated are only used when when_matched_update_all is set, and are otherwise ignored. The SQL condition and the DataFusion expression are mutually exclusive: when matched records are updated, setting both of them fails with LANCEDB_INVALID_ARGUMENT. In both flavors, use the prefix “target.” to refer to rows in the table, and the prefix “source.” to refer to rows in the merged data. For example: “target.version < source.version”
-
struct LanceDBMergeInsertOptions
- #include <lancedb.h>
Options for the merge insert entry points that expose explicit actions (lancedb_table_merge_insert_with_result and lancedb_table_merge_insert_with_options).
Every action is disabled unless its flag is non-zero. A NULL options pointer selects the same default upsert as lancedb_table_merge_insert(): update every matched row and insert every unmatched source row.
The matched-update condition is an SQL predicate over the joined rows. Use the prefix “target.” for rows in the table and “source.” for rows in the merged data, for example “target.version < source.version”. The by-source-delete filter is evaluated against unmatched target rows, so it names target columns directly, for example “version < 10”. A NULL condition means no condition; a non-NULL string, including an empty one, is passed to the SDK. The condition for an action is only read when that action is enabled, and a condition set for a disabled action is ignored. The strings are borrowed for the call.
use_index is -1 for the SDK default, 0 to disable indexed planning for the merge, or 1 to allow it. Embedded: 0 disables indexed planning; 1 and -1 leave the SDK’s indexed planning enabled when an index applies. This is not a guarantee that the join uses an index, and by-source deletion can use a full scan. Remote: only 0 sends use_index=false; 1 and -1 omit the parameter, so the server’s default applies.
timeout_ms is -1 for the SDK default, or a non-negative number of milliseconds, including 0. Embedded: the interval covers the Lance merge execution and its retries. SDK table checks, schema reads and the post-commit freshness update run outside it. Remote: the value is sent as the x-request-timeout-ms header on each request; client retries and backoff run outside that per-request interval.
The options struct and its strings are borrowed for the duration of the call and are not consumed.
-
struct LanceDBSessionOptions
- #include <lancedb.h>
Session creation options.
-
struct LanceDBSessionCacheStats
- #include <lancedb.h>
Session cache statistics.
-
struct LanceDBVersion
- #include <lancedb.h>
Version information for a table.
-
struct LanceDBVersionMetadata
- #include <lancedb.h>
Per-version metadata (key-value pairs).
-
struct LanceDBTag
- #include <lancedb.h>
Tag information for a table.
The array and its strings are read-only and owned by the library. Callers must not modify or free them individually. The strings remain valid until lancedb_free_tags() is called with the same array and count.
-
struct LanceDBBranchSource
- #include <lancedb.h>
Source reference for lancedb_table_create_branch().
Only the fields selected by kind are read; the caller may leave the other fields uninitialized.
LANCEDB_BRANCH_SOURCE_VERSION: has_version and version are read; has_version must be nonzero. name is not read.
LANCEDB_BRANCH_SOURCE_TAG: only name is read; it is the tag name.
LANCEDB_BRANCH_SOURCE_BRANCH: name and has_version are read. version is read only when has_version is nonzero; otherwise the branch head is used.
The pointed-to name is only read during the call.
-
struct LanceDBBranchCheckoutOptions
- #include <lancedb.h>
Optional version for lancedb_table_checkout_branch().
has_version set to 0 checks out the branch head and keeps the handle writable. Any other value pins the handle to version, which makes it a read-only detached view. version is read only when has_version is nonzero; otherwise it may be left uninitialized.
-
struct LanceDBBranch
- #include <lancedb.h>
Branch metadata returned by lancedb_table_list_branches().
The array, every string and every metadata array are owned by the result. Callers must not modify or free them individually. The strings remain valid until lancedb_free_branches() is called with the same array and count. parent_version is the parent branch version the branch diverged from, and manifest_size is the parent version’s manifest size in bytes at divergence.
-
struct LanceDBColumnSummary
- #include <lancedb.h>
One column description in a branch diff.
The strings are read-only and owned by the result that contains them.
-
struct LanceDBColumnChange
- #include <lancedb.h>
A column that exists in both branches with different definitions.
-
struct LanceDBIndexSummary
- #include <lancedb.h>
One index description in a branch diff.
index_type is NULL when the SDK response omitted it. columns is NULL when column_count is zero.
-
struct LanceDBRowCountSummary
- #include <lancedb.h>
Row-count classification from the SDK.
-
struct LanceDBCherryPickError
- #include <lancedb.h>
One error from a branch diff or cherry-pick result.
-
struct LanceDBBranchDiff
- #include <lancedb.h>
Full branch diff returned by lancedb_table_diff_branch().
Every array is in the SDK response order and NULL when its count is zero. The result owns all strings and arrays. The result remains valid until lancedb_free_branch_diff() is called with the same pointer. Callers must not modify or free nested strings or arrays individually.
-
struct LanceDBCherryPickResult
- #include <lancedb.h>
Result of lancedb_table_cherry_pick().
diff is an embedded copy of the branch diff; do not pass its address to lancedb_free_branch_diff(). promoted_columns is NULL when promoted_column_count is zero. main_version_after is read only when has_main_version_after is non-zero, because the SDK field is optional. The result owns all strings and arrays and remains valid until lancedb_free_cherry_pick_result() is called with the same pointer.
-
struct LanceDBDeltaRef
- #include <lancedb.h>
One endpoint of a table delta.
Set kind to LANCEDB_DELTA_REF_VERSION and version to a persisted table version, or kind to LANCEDB_DELTA_REF_TAG and tag to a NUL-terminated tag name. The field not selected by kind is ignored. A tag is resolved on the table’s current branch; a tag from another branch is rejected.
-
struct LanceDBReadConsistency
- #include <lancedb.h>
Read consistency of a connection.
interval_ms is the configured interval in whole milliseconds for LANCEDB_READ_CONSISTENCY_EVENTUAL, and 0 for the other modes. A positive interval set through the connection builder is returned unchanged.
-
enum LanceDBDistanceType