msokolov commented on code in PR #13985:
URL: https://github.com/apache/lucene/pull/13985#discussion_r2263026548


##########
lucene/core/src/java/org/apache/lucene/codecs/lucene99/Lucene99FlatVectorsReader.java:
##########
@@ -250,6 +262,13 @@ public RandomVectorScorer getRandomVectorScorer(String 
field, byte[] target) thr
         target);
   }
 
+  @Override
+  public void finishMerge() throws IOException {
+    // This makes sure that the access pattern hint is reverted back since 
HNSW implementation
+    // needs it
+    this.vectorData.updateReadAdvice(ReadAdvice.RANDOM);

Review Comment:
   This is too opinionated. If we want to have this swapping behavior I think 
we need to find a way to cache the original ReadAdvice and restore it, since we 
don't know what it was - that decision is made by the Directory and its hints 
and iocontexts and sysprops and so on. But I don't think we currently have 
`IOContext.getReadAdvice()`?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to