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 Ranveer Kumar <ra...@gmail.com> on 2010/01/28 08:53:27 UTC

How to disable wildcard search

Hi all,

How to remove/disable wildcard search in solr.
I have no requirement of wildcard.
is there any configuration to disable wildcard search in solr.

I am using solrj for searching..

thanks
With regards
Ranveer K Kumar

Re: How to disable wildcard search

Posted by Erik Hatcher <er...@gmail.com>.
There's no option to do this with the standard query parser, though  
you can easily subclass it and override getPrefixQuery (term* queries)  
and getWildcardQuery (for any other terms that have * or % in them) to  
throw an exception or convert it to a different type of query.

However, maybe your project is better suited to using the dismax  
parser, which doesn't support wildcard queries anyway.

	Erik

On Jan 28, 2010, at 2:53 AM, Ranveer Kumar wrote:

> Hi all,
>
> How to remove/disable wildcard search in solr.
> I have no requirement of wildcard.
> is there any configuration to disable wildcard search in solr.
>
> I am using solrj for searching..
>
> thanks
> With regards
> Ranveer K Kumar