Add setAllowLeadingWildcard(true); to the constructor of org.apache.solr.search.SolrQueryParser.java

Gr, Reza

On Jul 20, 2009, at 4:00 PM, Jeff Newburn wrote:

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