: > 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.
it's what the Query.rewrite method is for, it gets an IndexReader as input. your custom QueryParser should return a new type of query that rewrites itself into a MultiPhraseQuery -Hoss --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]