0
votes

I am using SOLR v7+ and trying to figure out how to specify a particular facet prefix for a particular facet field. Something like-

(facet.field=FIELD1 & facet.prefix=PREF1) AND (facet.field=FIELD2 & facet.prefix=PREF2)

So FIELD1 should contain prefix PREF1 and not PREF2, while FIELD2 should contain prefix PREF2 and not PREF1.

From this link, I tried this - f.<fieldName>.<originalParam>=<value> to solve my problem, it is not working. Can someone help me with this?

1

1 Answers

1
votes

Giving facet specific options through f.field.facet.<param> should work. The full syntax to get what you're asking for above, as URL parameters, would be:

facet.field=FIELD1&f.FIELD1.facet.prefix=PREF1&facet.field=FIELD2&f.FIELD2.facet.prefix=PREF2

Make sure to use the correct case for your field parameters, and there should be no AND anywhere - one facet.field parameter pr. field you want your facets for.