mirror of
https://github.com/pgvector/pgvector.git
synced 2026-06-30 01:31:15 +08:00
Added separate dimensions limit for ivfflat indexes
This commit is contained in:
@@ -338,6 +338,9 @@ InitBuildState(IvfflatBuildState * buildstate, Relation heap, Relation index, In
|
||||
if (buildstate->dimensions < 0)
|
||||
elog(ERROR, "column does not have dimensions");
|
||||
|
||||
if (buildstate->dimensions > IVFFLAT_MAX_DIM)
|
||||
elog(ERROR, "ivfflat index cannot have more than %d dimensions", IVFFLAT_MAX_DIM);
|
||||
|
||||
buildstate->reltuples = 0;
|
||||
buildstate->indtuples = 0;
|
||||
|
||||
|
||||
@@ -23,6 +23,8 @@
|
||||
#include "portability/instr_time.h"
|
||||
#endif
|
||||
|
||||
#define IVFFLAT_MAX_DIM VECTOR_MAX_DIM
|
||||
|
||||
/* Support functions */
|
||||
#define IVFFLAT_DISTANCE_PROC 1
|
||||
#define IVFFLAT_NORM_PROC 2
|
||||
|
||||
Reference in New Issue
Block a user