SearcherManager class, coming in the next (3.5.0) Lucene release, to periodically reopen your IndexSearcher when multiple threads need to share it. This class presents a very simple acquire release API, hiding the thread-safe complexities of opening and closing the underlying IndexReader s. IndexReader , which has relatively high turnaround time for index changes to become visible, since you must call IndexWriter.commit first. IndexWriter that's actively changing the index (i.e., it's in the same JVM as your searchers), use an NRT reader instead!
Read full article from Changing Bits: Near-real-time readers with Lucene's SearcherManager and NRTManager
No comments:
Post a Comment