lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Otis Gospodnetic <otis_gospodne...@yahoo.com>
Subject Re: QueryParser with stop/key words inside quotes
Date Mon, 14 Apr 2003 03:08:20 GMT
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 <victorh@nuix.com.au> 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: lucene-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: lucene-user-help@jakarta.apache.org
> 


__________________________________________________
Do you Yahoo!?
Yahoo! Tax Center - File online, calculators, forms, and more
http://tax.yahoo.com

---------------------------------------------------------------------
To unsubscribe, e-mail: lucene-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: lucene-user-help@jakarta.apache.org


Mime
View raw message