-
Notifications
You must be signed in to change notification settings - Fork 56
lazy load efSearch #52
lazy load efSearch #52
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just have a couple questions. Overall looks good to me
@@ -236,4 +236,8 @@ public void onFileDeleted(Path indexFilePath) { | |||
getInstance().cache.invalidate(indexFilePath.toString()); | |||
} | |||
}; | |||
|
|||
private String[] getQueryParams(String indexName) { | |||
return new String[] {"efSearch=" + KNNSettings.getEfSearchParam(indexName)}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you explain more why there is only 1 query parameter being passed in? Why are M and efConstruction not gotten?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
efSearch
is required only during searches. Other algorithm params are needed for indexing.
@@ -87,12 +87,6 @@ public long getIndexSize() { | |||
public void close() { | |||
Lock writeLock = readWriteLock.writeLock(); | |||
writeLock.lock(); | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is this no longer needed?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good catch. Bad merge. Will add it back.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM thanks!
Issue #, if available:
#51
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.