You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by GitBox <gi...@apache.org> on 2019/03/09 16:58:51 UTC

[GitHub] [lucene-solr] s1monw commented on a change in pull request #601: Adding reader settings for moving fst offheap

s1monw commented on a change in pull request #601: Adding reader settings for moving fst offheap
URL: https://github.com/apache/lucene-solr/pull/601#discussion_r264006143
 
 

 ##########
 File path: lucene/core/src/java/org/apache/lucene/store/Directory.java
 ##########
 @@ -48,6 +49,12 @@
  * @see FilterDirectory
  */
 public abstract class Directory implements Closeable {
+
+  /**
+   * Reader only attributes for this directory.
+   */
+  private Map<String, String> readerAttributes;
 
 Review comment:
   I don't think `Directory` is the right abstraction to hold this. I suggest we add an overload to DirectoryReader.open that looks like this:
   
   ```Java
     public static DirectoryReader open(final Directory directory, final Map<String, String> attributes) throws IOException;
   
   //
     public static DirectoryReader open(final IndexCommit commit, final Map<String, String> attributes) throws IOException;
   ```
   that allows us to have a dedicated map of attributes per open call. Subsequent reopens then inherit the attributes form the reader. You can also then make this a property of `DirecotryReader` I guess.

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org