Return-Path: Delivered-To: apmail-lucene-java-user-archive@www.apache.org Received: (qmail 94574 invoked from network); 2 Mar 2009 18:03:06 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 2 Mar 2009 18:03:06 -0000 Received: (qmail 26380 invoked by uid 500); 2 Mar 2009 18:02:59 -0000 Delivered-To: apmail-lucene-java-user-archive@lucene.apache.org Received: (qmail 26345 invoked by uid 500); 2 Mar 2009 18:02:59 -0000 Mailing-List: contact java-user-help@lucene.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: java-user@lucene.apache.org Delivered-To: mailing list java-user@lucene.apache.org Received: (qmail 26333 invoked by uid 99); 2 Mar 2009 18:02:59 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 02 Mar 2009 10:02:59 -0800 X-ASF-Spam-Status: No, hits=2.2 required=10.0 tests=HTML_MESSAGE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of erickerickson@gmail.com designates 64.233.182.185 as permitted sender) Received: from [64.233.182.185] (HELO nf-out-0910.google.com) (64.233.182.185) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 02 Mar 2009 18:02:51 +0000 Received: by nf-out-0910.google.com with SMTP id c7so545814nfi.15 for ; Mon, 02 Mar 2009 10:02:31 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:content-type; bh=DWIfm330bDvvEvJ1WI6Q1k8zWL//zbZXDIDkmFqR+ME=; b=azIwu618XwO+mZ/QFlO39Vg2BLEUosKd5BXacYk6z+YPHJRVkecHHY/wt2TAPEyf28 b0/fEYRf8pTiVVSnwVT36VeJn694EbNQ2t86XH9h00fDvuOT0aGIwgz+vqVOZ01bUbmX +o1cb8rGDUMg98PbQn2qJMCkJhrk0POQCIUx4= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; b=G8klr/0EoXQp6xnl4BVUXQeokN2iogVDlNpOefXP/Igj1ned/OOWebYpcyj1KP8L2x wt9GAjdsdTECqw3NbmuMKgLZ7ZlwQ84Qjo3rgRsMcX9U9ZMdOlnjps8m2u3ZH+278JVB 3jxgM7xQoK5BuWDfDEsIj1I9CjWtyxsMa5vcE= MIME-Version: 1.0 Received: by 10.220.87.4 with SMTP id u4mr1886148vcl.28.1236016949946; Mon, 02 Mar 2009 10:02:29 -0800 (PST) In-Reply-To: <20090302155817.GA29580@spitzing.malkusch.de> References: <20090302155817.GA29580@spitzing.malkusch.de> Date: Mon, 2 Mar 2009 13:02:29 -0500 Message-ID: <359a92830903021002k459e9b50r8e1da558cd0216cb@mail.gmail.com> Subject: Re: Restricting the result set with hierarchical ACL From: Erick Erickson To: java-user@lucene.apache.org Content-Type: multipart/alternative; boundary=0016e6475f1a3ceaae0464269f20 X-Virus-Checked: Checked by ClamAV on apache.org --0016e6475f1a3ceaae0464269f20 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit 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. Erick 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: java-user-unsubscribe@lucene.apache.org > For additional commands, e-mail: java-user-help@lucene.apache.org > > --0016e6475f1a3ceaae0464269f20--