: I have a single type field that can contain zero or more values (comma : separated values). This field stores some sort of access value. : : In the filter, I am given a list of allowed values for the field and a : document must be considered if all values contained in its field must be : present in the allowed values specified in the filter. : How can i write filter query for this?
My prefered solution is: 1) index the *unique* values as a multivalued StrField (ex: foo) 2) create a second field containing the *count* of unique values, CountFieldValuesUpdateProcessorFactory makes this trivial (ex: foo_count) 3) query/filter using the frange parser with l & h both =0, and the function being foo_count minus the sum of the termfreq results for each value the user posesses. Examples query... : 1. Case #1) If the allowed values specified in the filter are (a1, a3, : a4, a6) --> the document should not be considered since user doesn’t have fq={!frange l=0 h=0}sub(foo_count, sum(termfreq(foo,'a1), termfreq(foo,'a3'), termfreq(foo,'a4'), termfreq(foo,'a6'))) -Hoss http://www.lucidworks.com/