mirror of
https://github.com/pgvector/pgvector.git
synced 2026-07-13 08:06:54 +08:00
No need to increment wlen when removing
This commit is contained in:
@@ -645,11 +645,10 @@ HnswSearchLayer(Datum q, List *ep, int ef, int lc, Relation index, FmgrInfo *pro
|
|||||||
*/
|
*/
|
||||||
if (skipElement == NULL || list_length(e->element->heaptids) != 0)
|
if (skipElement == NULL || list_length(e->element->heaptids) != 0)
|
||||||
{
|
{
|
||||||
wlen++;
|
if (wlen >= ef)
|
||||||
|
|
||||||
/* No need to decrement wlen */
|
|
||||||
if (wlen > ef)
|
|
||||||
pairingheap_remove_first(W);
|
pairingheap_remove_first(W);
|
||||||
|
else
|
||||||
|
wlen++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user