mirror of
https://github.com/pgvector/pgvector.git
synced 2026-06-06 05:51:21 +08:00
Fixed issue
This commit is contained in:
@@ -23,6 +23,7 @@ GetScanItems(IndexScanDesc scan, Datum q)
|
||||
int m;
|
||||
HnswElement entryPoint;
|
||||
char *base = NULL;
|
||||
instr_time *start = hnsw_time_budget == -1 ? NULL : &so->start;
|
||||
|
||||
/* Get m and entry point */
|
||||
HnswGetMetaPageInfo(index, &m, &entryPoint);
|
||||
@@ -34,11 +35,11 @@ GetScanItems(IndexScanDesc scan, Datum q)
|
||||
|
||||
for (int lc = entryPoint->level; lc >= 1; lc--)
|
||||
{
|
||||
w = HnswSearchLayer(base, q, ep, 1, lc, index, procinfo, collation, m, false, NULL, &so->start);
|
||||
w = HnswSearchLayer(base, q, ep, 1, lc, index, procinfo, collation, m, false, NULL, start);
|
||||
ep = w;
|
||||
}
|
||||
|
||||
return HnswSearchLayer(base, q, ep, hnsw_ef_search, 0, index, procinfo, collation, m, false, NULL, &so->start);
|
||||
return HnswSearchLayer(base, q, ep, hnsw_ef_search, 0, index, procinfo, collation, m, false, NULL, start);
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
@@ -852,7 +852,7 @@ HnswSearchLayer(char *base, Datum q, List *ep, int ef, int lc, Relation index, F
|
||||
HnswElement cElement;
|
||||
|
||||
/* Check time budget */
|
||||
if (hnsw_time_budget != -1)
|
||||
if (start != NULL)
|
||||
{
|
||||
instr_time duration;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user