Hi,

I am using the following solution:
http://wiki.apache.org/solr/SimpleFacetParameters#Tagging_and_excluding_Filters

However when I implemented this on I found that I cannot combine different 
filter types:
http://search.un-informed.org/search?q=&=&t[23]=malaria&tm=any&s=Search

The above request would generate the following Solr query:
facet=true&fl=*,score&sort=score+desc&start=0&q=(tag_ids:("23"))&facet.field={!ex%3Ddt}organisation_id&facet.field={!ex%3Ddt}tag_ids&facet.field={!ex%3Ddt}addressee_ids&facet.field={!ex%3Ddt}operative_phrase_id&facet.field={!ex%3Ddt}documenttype_id&facet.field={!ex%3Ddt}information_type_id&facet.field={!ex%3Ddt}legal_value&json.nl=map&wt=json&rows=21

Now when I deselect one of the checkboxes I add an fq parameters:
facet=true&fl=*,score&sort=score+desc&start=0&q=(tag_ids:("23"))&facet.field={!ex%3Ddt}organisation_id&facet.field={!ex%3Ddt}tag_ids&facet.field={!ex%3Ddt}addressee_ids&facet.field={!ex%3Ddt}operative_phrase_id&facet.field={!ex%3Ddt}documenttype_id&facet.field={!ex%3Ddt}information_type_id&facet.field={!ex%3Ddt}legal_value&json.nl=map&wt=json&fq={!tag%3Ddt}organisation_id:(-"9")&rows=21

{!tag=dt}organisation_id:(-8)

Now where I am at a loss is when I want to filter in multiple different 
sections (like filter both organisations as well as clause information type.

I tried various ways of constructing the fq prameter but I always get a parse 
error:
{!tag=dt}(organisation_id:(-8) AND information_type_id:(-1))
{!tag=dt}organisation_id:(-8) AND {!tag=dt}information_type_id:(-1)

For example:
Caused by: org.apache.lucene.queryParser.ParseException: Cannot parse 
'organisation_id:(-"9") AND {!tag=dt}information_type_id:(-"1")': Encountered " 
"}" "} "" at line 1, column 35.

When running:
facet=true&fl=*,score&sort=score+desc&start=0&q=(tag_ids:("23"))&facet.field={!ex%3Ddt}organisation_id&facet.field={!ex%3Ddt}tag_ids&facet.field={!ex%3Ddt}addressee_ids&facet.field={!ex%3Ddt}operative_phrase_id&facet.field={!ex%3Ddt}documenttype_id&facet.field={!ex%3Ddt}information_type_id&facet.field={!ex%3Ddt}legal_value&json.nl=map&wt=json&fq={!tag%3Ddt}organisation_id:(-"9")+AND+{!tag%3Ddt}information_type_id:(-"1")&rows=21}

Can someone give me a hint?

regards,
Lukas Kahwe Smith
m...@pooteeweet.org



Reply via email to