lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Erick Erickson <erickerick...@gmail.com>
Subject Re: search for token starting with a wildcard
Date Thu, 12 Apr 2012 12:45:34 GMT
Typically, they index the text in reverse order
as well as forward order (similar to synonyms)
so if you have a term in your field
"reverse", you index "esrever" and now your
leading-wildcard search for "*verse" becomes
a trailing search for "esrev*".

There is an implementation in Solr, see:
http://wiki.apache.org/solr/AnalyzersTokenizersTokenFilters#solr.ReversedWildcardFilterFactory
that you might be able to get some ideas from.

Best
Erick


On Thu, Apr 12, 2012 at 3:59 AM,  <v.sevel@lombardodier.com> wrote:
> Hi,
>
> I have a large index with a field that contains a important number of
> terms. I knew that searching with a term starting with a wildcard was not
> a good idea; looking at WildcardTermEnum(IndexReader,Term) and
> IndexReader.terms(Term) I understand better why now. I have been asked
> however by my users to provide this type of feature. do you plan to
> address this in the future, or are there any workarounds? how do people do
> when they really need to be able to search for terms that start with
> wildcards?
> thanks
> vince
>
>
> ************************ DISCLAIMER ************************
> This message is intended only for use by the person to
> whom it is addressed. It may contain information that is
> privileged and confidential. Its content does not
> constitute a formal commitment by Lombard Odier & Cie
> or any of its branches or affiliates.
> If you are not the intended recipient of this message,
> kindly notify the sender immediately and destroy this
> message. Thank You.
> *****************************************************************

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


Mime
View raw message