- For
search, pass item bounding box values tofilterFn(#68), enabling the following pattern where a function is used to handle results instead of an array of ids:
index.search(10, 10, 20, 20, (i, x0, y0, x1, y1) => {
console.log(`Item found: ${items[i]}, bbox: ${x0} ${y0} ${x1} ${y1}`);
})- Up to 20% faster k-nearest-neighbors queries on large
knumbers.