lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ahmet Arslan <iori...@yahoo.com.INVALID>
Subject Re: Filter Query that matches all values of a field
Date Mon, 04 Jul 2016 20:41:33 GMT
Hi Vasu,


This question appears occasionally in the mailing list.
Please see https://issues.apache.org/jira/browse/LUCENE-7148

ahmet


On Monday, July 4, 2016 9:10 PM, Vasu Y <vyal2k@gmail.com> wrote:



Hi,
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?

To illustrate this further:
If a field "field1" in a document contains (a1, a3, a5) values.

   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
   access to “a5”.
   2. Case #2) If the allowed values specified in the filter are (a2, a4,
   a6) --> the document should not be considered since user doesn’t have
   access to “a1, a3, a5”.
   3. Case #3) If the allowed values specified in the filter are (a1, a3,
   a5) --> the document should be considered since user has access to all
   values of the field.
   4. Case #4) If the allowed values specified in the filter are (a1, a2,
   a3, a4, a5, a6) --> the document should be considered since user has access
   to all values of the field (and some more values also).


Thanks,
Vasu

Mime
View raw message