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 Sascha Szott <sz...@zib.de> on 2013/05/31 13:35:44 UTC

intersection of filter queries with raw query parser

Hi folks,

is it possible to use the raw query parser with a disjunctive filter 
query? Say, I have a field 'foo' and two values 'v1' and 'v2' (the field 
values are free text and can contain any character). What I want is to 
retrieve all documents satisying fq=foo:(v1 OR v2). In case only one 
field (v1) is given, the query fq={!raw f=foo}v1 works as expected. But 
how can I formulate the filter query (with the raw query parser) in case 
two values are provided.

The same question was posted on Stackoverflow 
(http://stackoverflow.com/questions/5637675/solr-query-with-raw-data-and-union-multiple-facet-values) 
two years ago. But there was only the advice to give up using the raw 
query parser which is not what I want to do.

Thanks in advance,
Sascha

Re: intersection of filter queries with raw query parser

Posted by Mikhail Khludnev <mk...@griddynamics.com>.
Hello Sascha,

I propose to call raw parser from standard one by nested query syntax
http://searchhub.org/2009/03/31/nested-queries-in-solr/

Regards.


On Fri, May 31, 2013 at 3:35 PM, Sascha Szott <sz...@zib.de> wrote:

> Hi folks,
>
> is it possible to use the raw query parser with a disjunctive filter
> query? Say, I have a field 'foo' and two values 'v1' and 'v2' (the field
> values are free text and can contain any character). What I want is to
> retrieve all documents satisying fq=foo:(v1 OR v2). In case only one field
> (v1) is given, the query fq={!raw f=foo}v1 works as expected. But how can I
> formulate the filter query (with the raw query parser) in case two values
> are provided.
>
> The same question was posted on Stackoverflow (http://stackoverflow.com/**
> questions/5637675/solr-query-**with-raw-data-and-union-**
> multiple-facet-values<http://stackoverflow.com/questions/5637675/solr-query-with-raw-data-and-union-multiple-facet-values>)
> two years ago. But there was only the advice to give up using the raw query
> parser which is not what I want to do.
>
> Thanks in advance,
> Sascha
>



-- 
Sincerely yours
Mikhail Khludnev
Principal Engineer,
Grid Dynamics

<http://www.griddynamics.com>
 <mk...@griddynamics.com>