Depending on how you are sending docs in for indexing, you could also add an 
additional field who's value was a string reverse of the primary value.  Then 
search that field with a trialing wildcard.



-----Original Message-----
From: Jeff Newburn [mailto:jnewb...@zappos.com] 
Sent: Monday, July 20, 2009 10:00 AM
To: solr-user@lucene.apache.org
Subject: Re: Wildcards at the Beginning of a Search.

There is a hacky way to do it if you can pull it off.  You can prepend some
known prefix to the field then strip it off when you get the results back.
An example would be putting Phone: in front of every value in a phone number
field then instead of searching like this *-111-1111 (which won't work) you
would search (Phone: *-111-1111).  Keep in mind this way will work
syntactically but basically changes the index into a file sort so you will
see a performance dip.
-- 
Jeff Newburn
Software Engineer, Zappos.com
jnewb...@zappos.com - 702-943-7562


> From: Erik Hatcher <e...@ehatchersolutions.com>
> Reply-To: <solr-user@lucene.apache.org>
> Date: Mon, 20 Jul 2009 08:20:15 -0400
> To: <solr-user@lucene.apache.org>
> Subject: Re: Wildcards at the Beginning of a Search.
> 
> See http://issues.apache.org/jira/browse/SOLR-218 - Solr currently
> does not have leading wildcard support enabled.
> 
> Erik
> 
> On Jul 20, 2009, at 8:09 AM, Jörg Agatz wrote:
> 
>> Hallo Solr Users...
>> 
>> I tryed to search with a Wildcard at the beginning from a search.
>> 
>> for example, i will search for "*est" and get "test, vogelnest,
>> fest, ...."
>> But it dosent work, i alsways get an error...
>> 
>> Now my Big brother GOOGLE tolds me, that it can work but a search
>> with a
>> Wildcad at the beginning need a long time...
>> 
>> Now i will test ist. but How?
> 

Reply via email to