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 Dmitry Kan <dm...@gmail.com> on 2011/05/23 10:38:43 UTC

query parser and other query filters

Hi all,

Can someone tell wether the query parser must always be the first step in
the processing chain, before any other filter / tokenizer hits the query?

Problem is that the user query can contain punctuation and we would like to
clean it similarly to what we do on the index side. Is there any way to tell
SOLR to execute query parser the last after all other filters have processes
the query?

-- 
Regards,

Dmitry Kan

Re: query parser and other query filters

Posted by Erick Erickson <er...@gmail.com>.
I don't quite understand what the problem is. If you're using the same
(or nearly the same) analysis chain for both query and index, you
should be getting the same treatment of punctuation.

Try looking at the analysis page from Solr admin and you'll see what
I'm talking about here. Many of the tokenizers remove punctuation.

Seeing your fieldtype definitions for the fields in question would help.

Some use cases would help too. Some applications do some query
pre-processing on the application side...

Best
Erick

On Mon, May 23, 2011 at 1:38 AM, Dmitry Kan <dm...@gmail.com> wrote:
> Hi all,
>
> Can someone tell wether the query parser must always be the first step in
> the processing chain, before any other filter / tokenizer hits the query?
>
> Problem is that the user query can contain punctuation and we would like to
> clean it similarly to what we do on the index side. Is there any way to tell
> SOLR to execute query parser the last after all other filters have processes
> the query?
>
> --
> Regards,
>
> Dmitry Kan
>