Hi,

I'm trying to find a way to express a certain query and wondering if anyone could help.

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.

This would be easier if I were trying to simply exclude documents that users 1,3, and 6 had worked on, but I'm really looking to "include" documents that this complement set of users worked on.

Wondering if there's any way to write this query without listing out each of the IDs in the complement set individually or (slightly better) creating range queries to express the complement set.

Thanks,
Doug

Reply via email to