Re: IndexWriter and IndexReader in a shared environment

2016-12-14 Thread Michael McCandless
> From: Michael McCandless [mailto:luc...@mikemccandless.com] > Sent: Thursday, July 07, 2016 8:52 AM > To: Lucene Users ; myshar...@gmail.com > Subject: Re: IndexWriter and IndexReader in a shared environment > > The API is pretty simple. > > Create IndexWriter and leave it open forev

RE: IndexWriter and IndexReader in a shared environment

2016-12-14 Thread Siraj Haider
m: Michael McCandless [mailto:luc...@mikemccandless.com] Sent: Thursday, July 07, 2016 8:52 AM To: Lucene Users ; myshar...@gmail.com Subject: Re: IndexWriter and IndexReader in a shared environment The API is pretty simple. Create IndexWriter and leave it open forever, using it to index/delete docu

Re: IndexWriter and IndexReader in a shared environment

2016-07-07 Thread Michael McCandless
The API is pretty simple. Create IndexWriter and leave it open forever, using it to index/delete documents, and periodically calling IW.commit when you need durability. Create a SearcherManager, passing it the IndexWriter, and use it per-search to acquire/release the searcher. Periodically (idea

Re: IndexWriter and IndexReader

2014-02-13 Thread Michael McCandless
Overwriting an index in-place while open IndexReaders are actively searching works fine. You can either open a new IW with OpenMode.CREATE, or, you can call IW.deleteAll() if you have an existing IW already open. Writing to a shared index directory mapped to N machines is not generally done, beca