mirror of
https://github.com/pgvector/pgvector.git
synced 2026-06-30 09:41:15 +08:00
Improved param code
This commit is contained in:
@@ -24,7 +24,7 @@ IvfflatInit(void)
|
||||
{
|
||||
ivfflat_relopt_kind = add_reloption_kind();
|
||||
add_int_reloption(ivfflat_relopt_kind, "lists", "Number of inverted lists",
|
||||
IVFFLAT_DEFAULT_LISTS, 1, IVFFLAT_MAX_LISTS
|
||||
IVFFLAT_DEFAULT_LISTS, IVFFLAT_MIN_LISTS, IVFFLAT_MAX_LISTS
|
||||
#if PG_VERSION_NUM >= 130000
|
||||
,AccessExclusiveLock
|
||||
#endif
|
||||
@@ -32,7 +32,7 @@ IvfflatInit(void)
|
||||
|
||||
DefineCustomIntVariable("ivfflat.probes", "Sets the number of probes",
|
||||
"Valid range is 1..lists.", &ivfflat_probes,
|
||||
1, 1, IVFFLAT_MAX_LISTS, PGC_USERSET, 0, NULL, NULL, NULL);
|
||||
IVFFLAT_DEFAULT_PROBES, IVFFLAT_MIN_LISTS, IVFFLAT_MAX_LISTS, PGC_USERSET, 0, NULL, NULL, NULL);
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
@@ -42,7 +42,9 @@
|
||||
|
||||
/* IVFFlat parameters */
|
||||
#define IVFFLAT_DEFAULT_LISTS 100
|
||||
#define IVFFLAT_MIN_LISTS 1
|
||||
#define IVFFLAT_MAX_LISTS 32768
|
||||
#define IVFFLAT_DEFAULT_PROBES 1
|
||||
|
||||
/* Build phases */
|
||||
/* PROGRESS_CREATEIDX_SUBPHASE_INITIALIZE is 1 */
|
||||
|
||||
Reference in New Issue
Block a user