Re: Can changes on an index be visible to an open IndexSearcher without reopening it?

2007-12-10 Thread Michael McCandless
This is an excellent question. You are right, what we really need is efficient reopening of an IndexSearcher. Creating & warming a new IndexSearcher can be expensive due [at least] to populating the FieldCache. This has been discussed before, eg here: http://www.gossamer-threads.com/lists/

Re: Can changes on an index be visible to an open IndexSearcher without reopening it?

2007-12-09 Thread Scott Tiger
No plan for IndexSearcher.reopen? I don't know about cost of creating IndexSearcher instance. But we almost need IndexSearcher.reopen instead of IndexReader.reopen. IndexReader reader = IndexReader.open(...); IndexSearcher searcher = new IndexSearcher(reader); searcher.search(...); ...for r

Re: Can changes on an index be visible to an open IndexSearcher without reopening it?

2007-11-05 Thread Michael McCandless
Unfortunately, no. Once open, the IndexReader/IndexSearcher searches a frozen "point in time" snapshot of the index as it existed when it was first opened. You'll have to open a new searcher in order to see the changes. However, there is work underway now to add a "reopen" method to IndexReader