You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-user@lucene.apache.org by MilleBii <mi...@gmail.com> on 2010/10/29 09:32:55 UTC

Newbie to Solr, LIKE:foo

I'm Nutch user but I'm considering to use Solr for the following reason.

I need a LIKE:foo , which turns into a *foo* query. I saw the built-in
prefix query parser but it does only look for foo*, if I understand it well
So is there a query parser that does what I'm looking.
If not how difficult is it to build one with Solr ?

-- 
-MilleBii-

Re: Newbie to Solr, LIKE:foo

Posted by Erick Erickson <er...@gmail.com>.
Not really. The problem here is that to perform this raw, you'd need
to enumerate every term in the index, which is pretty slow.

One solution is to use one of the ngram tokenizers, probably the
NGramFilterFactory to process the output of your tokenizers. Here's a
related place to start...
http://www.lucidimagination.com/blog/2009/09/08/auto-suggest-from-popular-queries-using-edgengrams/

HTH
Erick

On Fri, Oct 29, 2010 at 3:32 AM, MilleBii <mi...@gmail.com> wrote:

> I'm Nutch user but I'm considering to use Solr for the following reason.
>
> I need a LIKE:foo , which turns into a *foo* query. I saw the built-in
> prefix query parser but it does only look for foo*, if I understand it well
> So is there a query parser that does what I'm looking.
> If not how difficult is it to build one with Solr ?
>
> --
> -MilleBii-
>