Re: Open IndexReader read-only

2008-12-15 Thread Chris Bamford
Thanks Mark, worked a treat. Mark Miller wrote: Chris Bamford wrote: Mark > Look for the static factory methods on IndexReader. I take it you mean IndexReader.open (dir, true) ? Yeah. If so, how do I then pass that into DelayCloseIndexSearcher() so that I can continue to rely on all the e

Re: Open IndexReader read-only

2008-12-08 Thread Mark Miller
Chris Bamford wrote: Mark > Look for the static factory methods on IndexReader. I take it you mean IndexReader.open (dir, true) ? Yeah. If so, how do I then pass that into DelayCloseIndexSearcher() so that I can continue to rely on all the existing calls like: IndexReader reader = con

Re: Open IndexReader read-only

2008-12-08 Thread Chris Bamford
Mark > Look for the static factory methods on IndexReader. I take it you mean IndexReader.open (dir, true) ? If so, how do I then pass that into DelayCloseIndexSearcher() so that I can continue to rely on all the existing calls like: IndexReader reader = contentSearcher.getIndexReader();

Re: Open IndexReader read-only

2008-12-08 Thread Mark Miller
Look for the static factory methods on IndexReader. - Mark Chris Bamford wrote: Thanks Mark. I have identified the spot where I need to do the surgery. However, I discover that IndexReader is abstract, but it seems crazy that I need to make a concrete class for which I have no need to add a

Re: Open IndexReader read-only

2008-12-08 Thread Chris Bamford
Thanks Mark. I have identified the spot where I need to do the surgery. However, I discover that IndexReader is abstract, but it seems crazy that I need to make a concrete class for which I have no need to add any of my own logic... Is there a suitable subclass I can use? The documented one

Re: Open IndexReader read-only

2008-12-08 Thread Mark Miller
Chris Bamford wrote: So does that mean if you don't explicitly open an IndexReader, the IndexSearcher will do it for you? Or what? Right. The IndexReader takes a Directory, and the IndexSearcher takes an IndexReader - there are sugar constructors though - An IndexSearcher will also accept

Open IndexReader read-only

2008-12-08 Thread Chris Bamford
Hi Can someone guide me please? I have inherited a Lucene application and am attempting to update the API from 2.0 to 2.4. I note that the 2.4 CHANGELOG talks of opening an IndexReader with read-only=true to improve performance. Does anyone know how to do this? I have been combing my predeces