Fixing the bug when a segment has no vector field present for disk based vector search
The check will ensure that if there are segments with no vector field the disk based vector search is not crashing.
Whats the fix:
So I added couple of things in the code which will not only fix the bug but will also provide some speedup to the DiskAnn Queries in certain cases.
When the rescore pass happens in disk based vector search, only those segments are hit which has docs to be rescored. Earlier all the segments were getting rescore call even when they don't have to rescore the docs. This will provide some speed up to the query and also fix the bug.
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.
Description
Fixing the bug when a segment has no vector field present for disk based vector search
The check will ensure that if there are segments with no vector field the disk based vector search is not crashing.
Whats the fix:
So I added couple of things in the code which will not only fix the bug but will also provide some speedup to the DiskAnn Queries in certain cases.
Dev Testing
Create Index
Ingest 2 documents
Delete a document
Segments
Search Again with error
Response
Related Issues
Ref: https://github.com/opensearch-project/k-NN/pull/2278
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license. For more information on following Developer Certificate of Origin and signing off your commits, please check here.