mirror of
https://github.com/pgvector/pgvector.git
synced 2026-07-07 13:10:56 +08:00
Restored checks [skip ci]
This commit is contained in:
@@ -806,9 +806,16 @@ HnswSearchLayer(char *base, Datum q, List *ep, int ef, int lc, Relation index, F
|
|||||||
|
|
||||||
if (eDistance < f->distance || wlen < ef)
|
if (eDistance < f->distance || wlen < ef)
|
||||||
{
|
{
|
||||||
/* Copy e */
|
HnswCandidate *ec;
|
||||||
HnswCandidate *ec = palloc(sizeof(HnswCandidate));
|
|
||||||
|
|
||||||
|
Assert(!eElement->deleted);
|
||||||
|
|
||||||
|
/* Make robust to issues */
|
||||||
|
if (eElement->level < lc)
|
||||||
|
continue;
|
||||||
|
|
||||||
|
/* Copy e */
|
||||||
|
ec = palloc(sizeof(HnswCandidate));
|
||||||
HnswPtrStore(base, ec->element, eElement);
|
HnswPtrStore(base, ec->element, eElement);
|
||||||
ec->distance = eDistance;
|
ec->distance = eDistance;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user