Am 11.03.2013 14:13, schrieb Uwe Schindler:

>> Regarding the application of IndexSearcher.rewrite(Query) instead: I don't
>> see a way to set the rewrite method there because the Query's rewrite
>> method does not seem to apply to IndexSearcher.rewrite().
> 
> Replace:
>> BooleanQuery bq = (BooleanQuery) query.rewrite(reader);
> 
> With:
>> BooleanQuery bq = (BooleanQuery) indexSearcher.rewrite(query);
> 
> Otherwise you have to create a while-loop that rewrites the return value 
> again until rewrite() returns itself.

Right, I was under the false impression that the rewrite method set for
the initial query was not considered by IndexSearcher.rewrite().
Best,
Carsten

-- 
Institut für Deutsche Sprache | http://www.ids-mannheim.de
Projekt KorAP                 | http://korap.ids-mannheim.de
Tel. +49-(0)621-43740789      | schno...@ids-mannheim.de
Korpusanalyseplattform der nächsten Generation
Next Generation Corpus Analysis Platform

---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscr...@lucene.apache.org
For additional commands, e-mail: java-user-h...@lucene.apache.org

Reply via email to