Doesn't it work to call SolrQueryParser.setAllowLeadingWildcard?

It can be really slow, what an RDBMS person would call a full table scan.

There is an open bug to make that settable in a config file, but this is a pretty tiny change to the source.

   http://issues.apache.org/jira/browse/SOLR-218

wunder

On Nov 5, 2009, at 2:13 PM, Otis Gospodnetic wrote:

The guilt trick is not the best thing to try on public mailing lists. :)

The first thing that popped to my mind is to use 2 fields, where the second one contains the desrever string of the first one. The second idea is to use n-grams (if it's OK to tokenize), more specifically edge n-grams.

Otis
--
Sematext is hiring -- http://sematext.com/about/jobs.html?mls
Lucene, Solr, Nutch, Katta, Hadoop, HBase, UIMA, NLP, NER, IR



----- Original Message ----
From: A. Steven Anderson <a.steven.ander...@gmail.com>
To: solr-user@lucene.apache.org
Sent: Thu, November 5, 2009 3:04:32 PM
Subject: Re: leading and trailing wildcard query

No thoughts on this? Really!?

I would hate to admit to my Oracle DBE that Solr can't be customized to do a
common query that a relational database can do. :-(


On Wed, Nov 4, 2009 at 6:01 PM, A. Steven Anderson <
a.steven.ander...@gmail.com> wrote:

I've scoured the archives and JIRA , but the answer to my question is just
not clear to me.

With all the new Solr 1.4 features, is there any way to do a leading and
trailing wildcard query on an *untokenized* field?

e.g. q=myfield:*abc* would return a doc with myfield=xxxabcxxx

Yes, I know how expensive such a query would be, but we have the user
requirement, nonetheless.

If not, any suggestions on how to implement a custom solution using Solr?
Using an external data structure?


--
A. Steven Anderson


Reply via email to