: The query is against a schema that stores the user_ids who have worked on each
: document in a multi-value integer field called 'user_ids'.  I'd like to query
: solr for all documents that anyone other than a few users have worked on.
: 
: For instance, say the user group I'm working with is user_ids 1, 3, and 6.
: I'd like to get back the documents that any other users have worked on--the
: complement set of users.  This would be too many users to list out
: individually, I imagine.

if i'm understanding correctly you want documents where a multivalued 
field contains at least one value which is not in your input set (even if 
it also contains some items which are in your input set), is that correct?

I can't think of anyway to do that off the top of my head ... hmmm...  no 
that's a touch one.  set operations in Solr (and when matching in 
lucene) are really all about the documents themselves ... there's really 
no easy way to operate on the set of values for a field for a doc.

you could probably acheive something like this with a custom FunctionQuery 
(you can do almost anything with a FunctionQuery) -- but you'd have to 
write a custom ValueSource that knows about multiple values first.



-Hoss

Reply via email to