lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ken Krugler <>
Subject Re: Restricting the result set with hierarchical ACL
Date Mon, 02 Mar 2009 18:14:47 GMT
Hi Markus,

>I need to restrict the resultset to the appropriate rights of the user
>who is searching the index.
>A document may belong to several groups.
>A user must belong to all groups of the document to find it. There's one
>additional problem: The groups are a tree. A user is automaticaly
>in every parent group of his groups. For example A is a child of B, so a
>user in group A would also be allowed to see documents of group B.
>And now I have no Idea how to get a restricted search result from
>lucene. There are about 10000 documents, so I'm not very happy to filter
>them after the index was searched.

Well, 10K is actually a small number of docs.

And the real question is how many documents will typically be part of 
the found set, and thus in the set that needs to be filtered.

So try that first, as that's the obvious approach (to me, at least). 
Note that for this type of filtering, the way that you do the 
calculation will have a performance impact - e.g. you might want to 
use bitfields versus iterating over group names in the stored field.

Since the set of a document's groups has to be a complete subset of 
the user's groups, you can't use the typical approach of having a doc 
field with every group in it, then adding a required subclause to 
your query with every group as a boolean OR term.

-- Ken
Ken Krugler
+1 530-210-6378

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message