Which version of Lucene are you using and which Version constant do you pass to Analyzer and Query Parser? In 2.9.0 there was a bug/incorrect setting between the query parser and the Version.LUCENE_CURRENT / Version.LUCENE_29 setting. If you did not enable position increments in query parser, that setting wouldn't work. In 2.9.1 it is fixed, if you pass the same version constant to both analyzer and query parser.
Also the analyzers on indexing and query side must be identical or compatible. Uwe ----- Uwe Schindler H.-H.-Meier-Allee 63, D-28213 Bremen http://www.thetaphi.de eMail: u...@thetaphi.de > -----Original Message----- > From: Simon Wistow [mailto:si...@thegestalt.org] > Sent: Thursday, November 12, 2009 9:00 PM > To: Lucene > Subject: Unexpected results searching for phrase with stop words > > I have a document with the title "Here, there be dragons" and a body. > > When I search for > > Here, there be dragons > (no quotes) > > with a title boost of 2.0 and a body boost of 0.8 > > I get the document as the first hit which is what I'd expect. > > However, if change the query to > > "Here, there be dragons" > (with quotes) > > then I don't get the document at all. Which is not what I'd expect. > > I've tried modifying the phrase slop but still don't get any results > back. > > Am I doing something wrong? I suspect it's something to do with the > number of stop words in the query. Do I have to have an untokenized copy > of the title field lying around to search on? > > Thanks, > > Simon > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: java-user-unsubscr...@lucene.apache.org > For additional commands, e-mail: java-user-h...@lucene.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: java-user-unsubscr...@lucene.apache.org For additional commands, e-mail: java-user-h...@lucene.apache.org