: Can I build a query such as : : : -field: A : : which will return all documents that do not have "exclusive" A in the : their field's values. By exclusive I mean that I don't want documents : that only have A in their list of values. In my sample case, the query : would return doc A and B. Because they both have other values in field1.
the most straight forward way i know of to deal with requirements like this is to also have a field_count field where you record the number of values indexed into "field" ... an UpdateProcessor can automate creating this field for you, and then you can query for something like... -(+field:A +field_count:1) -Hoss