Am Montag, 16. August 2010, 18:35:36 schrieb Steven A Rowe: Hi,
> I wrote: > > QueryParser has a static method setLowercaseExpandedTerms() that you can > > call to turn on automatic pre-expansion query term downcasing: > > > > <http://lucene.apache.org/java/3_0_2/api/all/org/apache/lucene/queryParse > > r/QueryParser.html#setLowercaseExpandedTerms%28boolean%29> > Oops, setLowercaseExpandedTerms() is an instance method, not static. defaults to true. If i change my code: QueryParser qp = new QueryParser(Version.LUCENE_30, "contents", AnalyzerHelper.getWikipediaAnalyzer("de")); qp.setLowercaseExpandedTerms(false); <-- HERE String queryStr = "avl tree"; Query q = qp.parse(queryStr); String noFilesQueryStr = Metadata.TITLE + ":Datei*"; Query q2 = qp.parse(noFilesQueryStr); BooleanQuery finalQuery = new BooleanQuery(); finalQuery.add(q, Occur.MUST); finalQuery.add(q2, Occur.MUST_NOT); it works as expected. Thanks a lot for the hint! I think i'll recreate my index with a LowerCaseFilter, that should fix it, shouldn't it? regards Christoph Hermann -- Christoph Hermann Institut für Informatik Tel: +49 761-203-8171 Fax: +49 761-203-8162 e-mail: herm...@informatik.uni-freiburg.de --------------------------------------------------------------------- To unsubscribe, e-mail: java-user-unsubscr...@lucene.apache.org For additional commands, e-mail: java-user-h...@lucene.apache.org