Mailing List Archive

Wild-card search - *bas*
Hi All,

I am using lucene for search functionality in our project. I wanted to
implement the wild-card query such as '*bas*' which results in hits
containing 'database' and 'basic'. Can it be implemented using lucene. If
yes, how ? The org.apache.lucene.search package provides WildcardQuery and
FuzzyQuery classes. Do they have something to do with it. Or do i need to
write a separate Query class say, PartQuery and edit the QueryParser for
the same?

Kindly give your suggestions.

I have an urgent requirement, so an early reply will be highly appreciated.


Thanks in advance,

Sampreet.


--
To unsubscribe, e-mail: <mailto:lucene-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:lucene-user-help@jakarta.apache.org>
RE: Wild-card search - *bas* [ In reply to ]
Hello,

I was experimenting for the wild cards when I found that the
org.apache.lucene.search.PrefixQuery class uses reader.terms(prefix) to get
a set of terms, in the getQuery() method. These terms are later filtered to
get to the terms required by it. reader.terms() does not seem to return any
terms (infact, it is supposed to return all the terms in an index). How can
I get all the terms in an index within the PrefixQuery class?

Also, any kind of information on the working of QueryParserTokenManager
class will be helpful :-)

Thanks in advance,

Sampreet.


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