mirror of
https://github.com/GreptimeTeam/greptimedb.git
synced 2026-05-14 20:10:37 +00:00
fix: vector index metadata missing (#7575)
* fix: vector index metadata missing Signed-off-by: Dennis Zhuang <killme2008@gmail.com> * refactor: constants and test Signed-off-by: Dennis Zhuang <killme2008@gmail.com> --------- Signed-off-by: Dennis Zhuang <killme2008@gmail.com>
This commit is contained in:
@@ -33,6 +33,9 @@ use datatypes::schema::{
|
||||
COLUMN_FULLTEXT_OPT_KEY_CASE_SENSITIVE, COLUMN_FULLTEXT_OPT_KEY_FALSE_POSITIVE_RATE,
|
||||
COLUMN_FULLTEXT_OPT_KEY_GRANULARITY, COLUMN_SKIPPING_INDEX_OPT_KEY_FALSE_POSITIVE_RATE,
|
||||
COLUMN_SKIPPING_INDEX_OPT_KEY_GRANULARITY, COLUMN_SKIPPING_INDEX_OPT_KEY_TYPE,
|
||||
COLUMN_VECTOR_INDEX_OPT_KEY_CONNECTIVITY, COLUMN_VECTOR_INDEX_OPT_KEY_ENGINE,
|
||||
COLUMN_VECTOR_INDEX_OPT_KEY_EXPANSION_ADD, COLUMN_VECTOR_INDEX_OPT_KEY_EXPANSION_SEARCH,
|
||||
COLUMN_VECTOR_INDEX_OPT_KEY_METRIC,
|
||||
};
|
||||
use snafu::{ResultExt, ensure};
|
||||
use sqlparser::dialect::Dialect;
|
||||
@@ -222,18 +225,6 @@ pub fn validate_column_skipping_index_create_option(key: &str) -> bool {
|
||||
.contains(&key)
|
||||
}
|
||||
|
||||
/// Valid options for VECTOR INDEX:
|
||||
/// - engine: Vector index engine (usearch)
|
||||
/// - metric: Distance metric (l2sq, cosine, inner_product)
|
||||
/// - connectivity: HNSW M parameter
|
||||
/// - expansion_add: ef_construction parameter
|
||||
/// - expansion_search: ef_search parameter
|
||||
pub const COLUMN_VECTOR_INDEX_OPT_KEY_ENGINE: &str = "engine";
|
||||
pub const COLUMN_VECTOR_INDEX_OPT_KEY_METRIC: &str = "metric";
|
||||
pub const COLUMN_VECTOR_INDEX_OPT_KEY_CONNECTIVITY: &str = "connectivity";
|
||||
pub const COLUMN_VECTOR_INDEX_OPT_KEY_EXPANSION_ADD: &str = "expansion_add";
|
||||
pub const COLUMN_VECTOR_INDEX_OPT_KEY_EXPANSION_SEARCH: &str = "expansion_search";
|
||||
|
||||
pub fn validate_column_vector_index_create_option(key: &str) -> bool {
|
||||
[
|
||||
COLUMN_VECTOR_INDEX_OPT_KEY_ENGINE,
|
||||
|
||||
Reference in New Issue
Block a user