Use the following query:

/select?q=*:*&rows=0&wt=json&indent=true&fl=NOT_IMPORTANT&facet=true&facet.zeros=false&fq={!tag=mk
q.op=OR}make:(Ford red 2010)&fq={!tag=cl  q.op=OR}color:(Ford red
2010)&fq={!tag=yr  q.op=OR}year:(Ford red 2010)&facet.field={!ex=cl,yr
key=mk}make&facet.field={!ex=mk,yr key=cl}color&facet.field={!ex=mk,cl
key=yr}year

The mk facet will tell you what makes are found in your free text search,
the cl will tell your the colors and yr will tell you the years. This
approach has the advantage of using all the synonyms defined for your text
field.

--
View this message in context: 
http://lucene.472066.n3.nabble.com/use-query-to-set-filter-on-fields-tp2190595p3167444.html
Sent from the Solr - User mailing list archive at Nabble.com.

Reply via email to