mogui commented on a change in pull request #679: URL: https://github.com/apache/lucene/pull/679#discussion_r806709538
########## File path: lucene/monitor/src/java/org/apache/lucene/monitor/QueryIndex.java ########## @@ -87,8 +81,20 @@ final Map<IndexReader.CacheKey, QueryTermFilter> termFilters = new HashMap<>(); QueryIndex(MonitorConfiguration config, Presearcher presearcher) throws IOException { Review comment: HI @romseygeek, thanks for the reply, ok for everything! I'll work on that, regarding the interface implementation split, that I agree it's more clear, How you suggest to let user select the implementattion? Keeping the readonly flag in MonitorConfiguration and instantiating the correct on in Monitor, should be enough? ########## File path: lucene/monitor/src/java/org/apache/lucene/monitor/QueryIndex.java ########## @@ -87,8 +81,20 @@ final Map<IndexReader.CacheKey, QueryTermFilter> termFilters = new HashMap<>(); QueryIndex(MonitorConfiguration config, Presearcher presearcher) throws IOException { Review comment: Yes, it makes sense. ########## File path: lucene/monitor/src/java/org/apache/lucene/monitor/QueryIndex.java ########## @@ -87,8 +81,20 @@ final Map<IndexReader.CacheKey, QueryTermFilter> termFilters = new HashMap<>(); QueryIndex(MonitorConfiguration config, Presearcher presearcher) throws IOException { Review comment: I'm trying to wrap my head around it and tried few things, but from what I understand search methods cannot be isolted from cache population, so without a middle abstract class I'll end up with a lot of duplicate code. I don't like this Interface -> BaseAbstract and two implemtation hierarchy so much. We could skip the interface, but still I don't like so much. Maybe I'm missing something, but Monitor.search seems very coupled with loading in memory all stored queries in `ConcurrentMap<String, QueryCacheEntry> queries` so I have to replicate all query cache releated code. Am I wrong? ########## File path: lucene/monitor/src/java/org/apache/lucene/monitor/QueryIndex.java ########## @@ -87,8 +81,20 @@ final Map<IndexReader.CacheKey, QueryTermFilter> termFilters = new HashMap<>(); QueryIndex(MonitorConfiguration config, Presearcher presearcher) throws IOException { Review comment: I'm trying to wrap my head around it and tried few things, but from what I understand search methods cannot be isolated from cache population, so without a middle abstract class I'll end up with a lot of duplicate code. I don't like to have `Interface -> BaseAbstract` and two implemtation hierarchy so much. We could skip the interface, but still I don't like it. Maybe I'm missing something, but Monitor.search seems very coupled with loading in memory all stored queries in `ConcurrentMap<String, QueryCacheEntry> queries` so I have to replicate all query cache releated code. Am I wrong? ########## File path: lucene/monitor/src/java/org/apache/lucene/monitor/QueryIndex.java ########## @@ -87,8 +81,20 @@ final Map<IndexReader.CacheKey, QueryTermFilter> termFilters = new HashMap<>(); QueryIndex(MonitorConfiguration config, Presearcher presearcher) throws IOException { Review comment: Nevermind, I got it or maybe I just think i did :) Tomorrow I'll update the pull request. -- 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: issues-unsubscr...@lucene.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org For additional commands, e-mail: issues-h...@lucene.apache.org