lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Murdoch, Paul" <>
Subject Set Analyzer without QueryParser
Date Tue, 20 Apr 2010 19:08:35 GMT


I'm building a BooleanQuery that may contain a  NumericRangeQuery.  The
NRQ may be one of several sub-queries in the parent BooleanQuery.  I
wasn't able to make the NRQ function properly by extending the
QueryParser and overriding the getRangeQuery method.  So I'm building
the entire BooleanQuery in code.  I'm passing the BooleanQuery to an
IndexSearcher to get hits, but I'm not getting the expected results.  I
believe this is due to not setting the Analyzer.  I'm used to using the
QueryParser constructor to set the Analyzer to be the same as the
IndexWriter's that built the index.  So how do I set the Analyzer for an
IndexSearcher without instantiating a QueryParser?  I'm using 2.9.2.






  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message