|
|
-
Re: QueryParser with stop/key words inside quotesOtis Gospodnetic 2003-04-14, 03:08
The place to look is QueryParser.jj, method getFieldQuery, but it looks
like the code doesn't figure out it's parsing a phrase query until after it passes the query string through the Analyzer. However, would you even want to do something like that? If you use the same Analyzer, with the same list of stop words for both indexing and searching, and then you don't strip stop words from phrase queries, no phrase query with a stop word will yield you any results. Otis --- Victor Hadianto <[EMAIL PROTECTED]> wrote: > > Lucene's QueryParsers seems to drop stop/key words even if they are > enclosed > in double quotes. > > For example: > > apple for tomato > --> +apple +tomato > > Which is what I expected, however > > "apple for tomato" > --> "apple tomato" > > and "for" in between apple and tomato is conveniently dropped. > > Is there a way to tell QueryParser not to drop those words if they > are > enclosed in double quotes? > > Thanks, > > victor > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > __________________________________________________ Do you Yahoo!? Yahoo! Tax Center - File online, calculators, forms, and more http://tax.yahoo.com --------------------------------------------------------------------- |