opensearch-project / k-NN

🆕 Find the k-nearest neighbors (k-NN) for your vector data
https://opensearch.org/docs/latest/search-plugins/knn/index/
Apache License 2.0
156 stars 123 forks source link

[FEATURE]Enhancement of nested field query by avoiding copying of parent filter to int array #2217

Open heemin32 opened 1 month ago

heemin32 commented 1 month ago

For nested field, OpenSearch convert parent filter bitset to int array before passing it to JNI layer. https://github.com/opensearch-project/k-NN/blob/main/src/main/java/org/opensearch/knn/index/query/KNNWeight.java#L190C19-L190C36

We might be able to use the bitset directly from faiss engine without converting its format. This could save the both cpu and memory usage.

luyuncheng commented 1 month ago

LGTM