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.



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,


To unsubscribe, e-mail:
For additional commands, e-mail:

Search Discussions

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupjava-user @
postedDec 12, '01 at 7:13a
activeDec 12, '01 at 7:13a

1 user in discussion

Sampreet: 1 post



site design / logo © 2022 Grokbase