lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From <sampr...@interactive1.com>
Subject Re:query parser and specific type of query
Date Wed, 12 Dec 2001 07:13:23 GMT
Hi Rahul,

I think you need to use the PhraseQuery. It is used by QueryParser when the
search string is given in quotes say "company shareholders"

The FuzzyQuery has a functinality similar to soundex() function in oracle,
ie searching for similar sounding words as that of the search keyword. It
will be used by the QueryParser when the search keyword is followed by ~
say place~ will result in documents containing words
like 'pace', 'place', 'plague' etc.

Hope this works for u.

Sampreet


Hi,

I would like to know how to do the following using Lucene:
I index some file containing a string "king of spades" using stop analyzer.
The analyzer filters out "of" in the above string since it is not useful
for searching
and indexes king and spades.
Its fine till this point.

Now i would like to search for the same string "king of spades".
My questions are,
1. If i want to generate a PhraseQuery from the QueryParser using
StopAnalyzer, what
should be done?
2. If i want to generate a FuzzyQuery from the QueryParser using
StopAnalyzer, what
should be done?

thanks for any help,

regards,
==Rahul==


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


Mime
View raw message