: This goes back to my question about access control lists. So, I have all 
: my documents, which are products. And then someone suggested that I have 
: a separate user document type with a multi-value field of productIDs.
: 
: In SQL, this would be the equivalent of:
: 
: "SELECT * from product where ... AND productId IN (SELECT productId from 
: user where userId = ?)"
: 
: So, my main search clause is a normal search. But, I want to filter the 
: results by the values in a completely different document where they 
: match on some field.

Assuming we're talking about a plugin here (request handler or 
QueryComponent)  youd do the "iner" query first, get your results, and 
then use it to cronst the query for the outer query.

but assuming productId is a uniqueKey, this is really just a less 
efficient way of filtering on a DocSet/BitSet you've manually constructed  
containing all of the "products" you know the user has. (which as i recall 
is what you said you were currently doing in the other thread)




-Hoss

Reply via email to