Hi, On Tue, Apr 8, 2014 at 11:51 AM, Chetan Mehrotra <[email protected]> wrote: > 1. Multiple IndexSearcher instances - Current impl would create a new > IndexSearcher for every Lucene query as the OakDirectory uses is bound > to NodeState of executing JCR session.
Since the Lucene index is in any case updated asynchronously, it should be fine for us to ignore the base NodeState of the current session and instead use an IndexSearcher based on the last state as updated by the async indexer. This would allow us to reuse the IndexSearcher over multiple queries. > 2. Index Access - Currently we have custom OakDirectory which provides > access to Lucene indexes stored in NodeStore. Even with SegmentStore > which has memory mapped file the random access used by Lucene would > probably be lot slower with OakDirectory in comparison to default > Lucene MMapDirectory. There's of course some extra overhead in going through Oak's Blob interface, but I would be surprised if this turned out to be significant and impossible to optimize as the frequently accessed parts of the index would in either case be cached in memory. So I'd go with approach 1 first and see where we are then before jumping to conclusions on this one. BR, Jukka Zitting
