On Dienstag, 26. August 2008, Chris Bamford wrote:

> That sounds like what I'm after - but how do I get hold of the
> IndexReader so I can call IndexReader.terms(Term) ?
> The code where I am doing this work is getFieldQuery(String field,
> String queryText) of my custom query parser ...

QueryParser indeed doesn't know about IndexSearchers and IndexReaders, so 
you either have to do the work outside (whereever you have an 
IndexSearcher, it lets you access the IndexReader) and hand the results 
over to your QueryParser via e.g. its constructor. Or you hand over the 
IndexReader to your QueryParser. That's not really elegant but I don't 
know a better solution.

Regards
 Daniel

-- 
http://www.danielnaber.de

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to