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 Selvam Raman <se...@gmail.com> on 2017/12/22 10:57:49 UTC

Edismax leading wildcard search

Hi,

Solr version - 6.4

Parser - Edismax

Leading wildcard search is allowed in edismax.

1) how can i disable leading wildcard search
2) why leading wildcard search takes so much of time to give the response.

-- 
Selvam Raman
"லஞ்சம் தவிர்த்து நெஞ்சம் நிமிர்த்து"

Re: Edismax leading wildcard search

Posted by Erick Erickson <er...@gmail.com>.
Well, the other option is to allow leading wildcards, but use
ReversedWildcardFilterFactory. Admittedly that increases the size of
your index, but apparently your users expect leading wildcards so why
not support them?

Best,
Erick
On Fri, Dec 7, 2018 at 6:58 AM Kudrettin Güleryüz <ku...@gmail.com> wrote:
>
> Hi,
>
> I am also wondering how to disable leading wildcards in Solr. Can you
> please suggest how to disable leading wildcards in Solr? I know in Lucene
> it is a flag that's set to false by default.
>
> > Do it on the client side. Just don't allow leading asterisks or question
> marks in your query term.
>
> This does not look trivial to me. A search query can be very complicated.
> How do you suggest to detect trailing wildcards from a complicated Lucene
> query?
>
> Thank you
>
> On Fri, Dec 22, 2017 at 6:07 AM Michael Kuhlmann <ku...@solr.info> wrote:
>
> > Am 22.12.2017 um 11:57 schrieb Selvam Raman:
> > > 1) how can i disable leading wildcard search
> >
> > Do it on the client side. Just don't allow leading asterisks or question
> > marks in your query term.
> >
> > > 2) why leading wildcard search takes so much of time to give the
> > response.
> > >
> >
> > Because Lucene can't just look in the index for all terms beginning with
> > something; it needs to look in all terms instead. Basically, indexed
> > terms are in alphabetical order, but that doesn't help with leading
> > wildcards.
> >
> > There's a ReversedWildcardFilterFactory in Solr to address this issue.
> >
> > -Michael
> >

Re: Edismax leading wildcard search

Posted by Kudrettin Güleryüz <ku...@gmail.com>.
Hi,

I am also wondering how to disable leading wildcards in Solr. Can you
please suggest how to disable leading wildcards in Solr? I know in Lucene
it is a flag that's set to false by default.

> Do it on the client side. Just don't allow leading asterisks or question
marks in your query term.

This does not look trivial to me. A search query can be very complicated.
How do you suggest to detect trailing wildcards from a complicated Lucene
query?

Thank you

On Fri, Dec 22, 2017 at 6:07 AM Michael Kuhlmann <ku...@solr.info> wrote:

> Am 22.12.2017 um 11:57 schrieb Selvam Raman:
> > 1) how can i disable leading wildcard search
>
> Do it on the client side. Just don't allow leading asterisks or question
> marks in your query term.
>
> > 2) why leading wildcard search takes so much of time to give the
> response.
> >
>
> Because Lucene can't just look in the index for all terms beginning with
> something; it needs to look in all terms instead. Basically, indexed
> terms are in alphabetical order, but that doesn't help with leading
> wildcards.
>
> There's a ReversedWildcardFilterFactory in Solr to address this issue.
>
> -Michael
>

Re: Edismax leading wildcard search

Posted by Michael Kuhlmann <ku...@solr.info>.
Am 22.12.2017 um 11:57 schrieb Selvam Raman:
> 1) how can i disable leading wildcard search

Do it on the client side. Just don't allow leading asterisks or question
marks in your query term.

> 2) why leading wildcard search takes so much of time to give the response.
> 

Because Lucene can't just look in the index for all terms beginning with
something; it needs to look in all terms instead. Basically, indexed
terms are in alphabetical order, but that doesn't help with leading
wildcards.

There's a ReversedWildcardFilterFactory in Solr to address this issue.

-Michael