Return-Path: Delivered-To: apmail-jakarta-lucene-user-archive@www.apache.org Received: (qmail 38546 invoked from network); 4 Dec 2004 09:53:44 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur-2.apache.org with SMTP; 4 Dec 2004 09:53:44 -0000 Received: (qmail 90863 invoked by uid 500); 4 Dec 2004 09:53:39 -0000 Delivered-To: apmail-jakarta-lucene-user-archive@jakarta.apache.org Received: (qmail 90798 invoked by uid 500); 4 Dec 2004 09:53:39 -0000 Mailing-List: contact lucene-user-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "Lucene Users List" Reply-To: "Lucene Users List" Delivered-To: mailing list lucene-user@jakarta.apache.org Received: (qmail 90783 invoked by uid 99); 4 Dec 2004 09:53:39 -0000 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests=FORGED_RCVD_HELO X-Spam-Check-By: apache.org Received-SPF: pass (hermes.apache.org: local policy) Received: from smtp-vbr13.xs4all.nl (HELO smtp-vbr13.xs4all.nl) (194.109.24.33) by apache.org (qpsmtpd/0.28) with ESMTP; Sat, 04 Dec 2004 01:53:37 -0800 Received: from k8l.lan (porta.xs4all.nl [80.127.24.69]) by smtp-vbr13.xs4all.nl (8.12.11/8.12.11) with ESMTP id iB49rYi4009466 for ; Sat, 4 Dec 2004 10:53:34 +0100 (CET) (envelope-from paul.elschot@xs4all.nl) From: Paul Elschot To: lucene-user@jakarta.apache.org Subject: Re: restricting search result Date: Sat, 4 Dec 2004 10:53:34 +0100 User-Agent: KMail/1.5.4 References: In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200412041053.34545.paul.elschot@xs4all.nl> X-Virus-Scanned: by XS4ALL Virus Scanner X-Virus-Checked: Checked X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N Paul, On Friday 03 December 2004 23:31, you wrote: > Hi, > how yould you restrict the search results for a certain user? I'm One way to restrict results is by using a Filter. > indexing all the existing data in my application but there are certain > access levels so some users should see more results then an other. > Each lucene document has a field with an internal id and I want to > restrict on that basis. I tried it with adding a long concatenation of > my ids ("+locationId:1 +locationId:3 + ...") but this throws a "More > than 32 required/prohibited clauses in query." exception. > Any suggestions? Using a + before each term requires them all, ie. uses AND, which would normally have an empty result for an Id field. You might prefer this query concatenation: +(locationId:1 locationId:3 ...) It effectively OR's the locationId content query and requires only one of the terms to match. In this case using a Filter would probably be better, though. Regards, Paul --------------------------------------------------------------------- To unsubscribe, e-mail: lucene-user-unsubscribe@jakarta.apache.org For additional commands, e-mail: lucene-user-help@jakarta.apache.org