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 Peter Keegan <pe...@gmail.com> on 2014/01/10 14:34:14 UTC

leading wildcard characters

How do you disable leading wildcards in 4.X? The setAllowLeadingWildcard
method is there in the parser, but nothing references the getter. Also, the
Edismax parser always enables it and provides no way to override.

Thanks,
Peter

Re: leading wildcard characters

Posted by Peter Keegan <pe...@gmail.com>.
I created SOLR-5630.
Although WildcardQuery is much much faster now with AutomatonQuery, it can
still result in slow queries when used in multiple keywords. From my
testing, I think I will need to disable all WildcardQuerys and only allow
PrefixQuery.

Peter


On Sat, Jan 11, 2014 at 4:17 AM, Ahmet Arslan <io...@yahoo.com> wrote:

> Hi Peter,
>
> Yes you are correct. There is no way to disable it.
>
> Weird thing is javadoc says default is false but it is enabled by default
> in SolrQueryParserBase.
> boolean allowLeadingWildcard = true;
>
>
>
> http://search-lucene.com/jd/solr/solr-core/org/apache/solr/parser/SolrQueryParserBase.html#setAllowLeadingWildcard(boolean)
>
>
> There is an effort for making such (allowLeadingWilcard,fuzzyMinSim,
> fuzzyPrefixLength) properties configurable :
> https://issues.apache.org/jira/browse/SOLR-218
>
> But this one is somehow old. Since its description is stale, do you want
> to open a new one?
>
> Ahmet
>
>
> On Friday, January 10, 2014 6:12 PM, Peter Keegan <pe...@gmail.com>
> wrote:
> Removing ReversedWildcardFilterFactory  had no effect.
>
>
>
> On Fri, Jan 10, 2014 at 10:48 AM, Ahmet Arslan <io...@yahoo.com> wrote:
>
> > Hi Peter,
> >
> > Can you remove any occurrence of ReversedWildcardFilterFactory in
> > schema.xml? (even if you don't use it)
> >
> > Ahmet
> >
> >
> >
> > On Friday, January 10, 2014 3:34 PM, Peter Keegan <
> peterlkeegan@gmail.com>
> > wrote:
> > How do you disable leading wildcards in 4.X? The setAllowLeadingWildcard
> > method is there in the parser, but nothing references the getter. Also,
> the
> > Edismax parser always enables it and provides no way to override.
> >
> > Thanks,
> > Peter
> >
> >
>
>

Re: leading wildcard characters

Posted by Ahmet Arslan <io...@yahoo.com>.
Hi Peter,

Yes you are correct. There is no way to disable it. 

Weird thing is javadoc says default is false but it is enabled by default in SolrQueryParserBase. 
boolean allowLeadingWildcard = true;


http://search-lucene.com/jd/solr/solr-core/org/apache/solr/parser/SolrQueryParserBase.html#setAllowLeadingWildcard(boolean)


There is an effort for making such (allowLeadingWilcard,fuzzyMinSim, fuzzyPrefixLength) properties configurable : https://issues.apache.org/jira/browse/SOLR-218

But this one is somehow old. Since its description is stale, do you want to open a new one?

Ahmet  


On Friday, January 10, 2014 6:12 PM, Peter Keegan <pe...@gmail.com> wrote:
Removing ReversedWildcardFilterFactory  had no effect.



On Fri, Jan 10, 2014 at 10:48 AM, Ahmet Arslan <io...@yahoo.com> wrote:

> Hi Peter,
>
> Can you remove any occurrence of ReversedWildcardFilterFactory in
> schema.xml? (even if you don't use it)
>
> Ahmet
>
>
>
> On Friday, January 10, 2014 3:34 PM, Peter Keegan <pe...@gmail.com>
> wrote:
> How do you disable leading wildcards in 4.X? The setAllowLeadingWildcard
> method is there in the parser, but nothing references the getter. Also, the
> Edismax parser always enables it and provides no way to override.
>
> Thanks,
> Peter
>
>


Re: leading wildcard characters

Posted by Peter Keegan <pe...@gmail.com>.
Removing ReversedWildcardFilterFactory  had no effect.


On Fri, Jan 10, 2014 at 10:48 AM, Ahmet Arslan <io...@yahoo.com> wrote:

> Hi Peter,
>
> Can you remove any occurrence of ReversedWildcardFilterFactory in
> schema.xml? (even if you don't use it)
>
> Ahmet
>
>
>
> On Friday, January 10, 2014 3:34 PM, Peter Keegan <pe...@gmail.com>
> wrote:
> How do you disable leading wildcards in 4.X? The setAllowLeadingWildcard
> method is there in the parser, but nothing references the getter. Also, the
> Edismax parser always enables it and provides no way to override.
>
> Thanks,
> Peter
>
>

Re: leading wildcard characters

Posted by Ahmet Arslan <io...@yahoo.com>.
Hi Peter,

Can you remove any occurrence of ReversedWildcardFilterFactory in schema.xml? (even if you don't use it)

Ahmet



On Friday, January 10, 2014 3:34 PM, Peter Keegan <pe...@gmail.com> wrote:
How do you disable leading wildcards in 4.X? The setAllowLeadingWildcard
method is there in the parser, but nothing references the getter. Also, the
Edismax parser always enables it and provides no way to override.

Thanks,
Peter