<div dir="ltr">Hi All,<div><br></div><div style><div>It would be useful to implement some kind of 'algebra of sets': intersection, union, and subtraction of sets defined by two abstract queries.</div><div><br></div>
<div>Let I am writing a subsystem which should accept some queries A and B and do something with it's intersection. Is it possible someway?</div><div><br></div><div>The particular (simplified) usecase: Let we have Users, Groups, and Documents belonging to User (individual), or Group (shared).</div>
<div><br></div><div>We have wrote a 'user access' subsystem which restricts access to Documents and returns some DocumentSet (query?) object (document_set_a) which refers to all Documents belonging to this User directly or through the Group.</div>
<div><br></div><div>Also we have wrote some other subsystem, let it be 'document index', which returns other DocumentSet (query?) object (document_set_b) which refers to all Documents containing passed keywords.</div>
<div><br></div><div>Now we want to write user-restricted document index: the user passes us keywords and wants to see all Documents belonging to him and containing these keywords. So we should return a DocumentSet which is an intersection of document_set_a and document_set_b.</div>
<div><br></div><div style>Regards,</div><div style>Vsevolod</div><div style><br></div></div></div>