lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Erick Erickson <>
Subject Re: Restricting the result set with hierarchical ACL
Date Mon, 02 Mar 2009 18:02:29 GMT
If you have a reasonable way of getting the doc IDs that
your user is allowed to see (and it appears you do), you
probably want a Filter. At root a Filter is just a BitSet
where you turn on the bit for each document that *could*
be allowed in the results and pass that filter to the appropriate
search routine.

CachingWrapperFilter may be your friend if you want to keep
some of these filters around after you've created them.


On Mon, Mar 2, 2009 at 10:58 AM, <> wrote:

> Dear list
> I need to restrict the resultlist 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.
> I tried to get all allowed document ids (there's a field for the id) and
> put them into a BooleanQuery (id1 or id2, ...), but then I get a
> BooleanQuery$TooManyClauses: maxClauseCount is set to 1024
> So how can I restrict my search results with lucene?
> Markus Malkusch
> ---------------------------------------------------------------------
> To unsubscribe, e-mail:
> For additional commands, e-mail:

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message