Return-Path: Delivered-To: apmail-jakarta-lucene-user-archive@www.apache.org Received: (qmail 27855 invoked from network); 20 Dec 2004 10:51:43 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur-2.apache.org with SMTP; 20 Dec 2004 10:51:43 -0000 Received: (qmail 33113 invoked by uid 500); 20 Dec 2004 10:50:50 -0000 Delivered-To: apmail-jakarta-lucene-user-archive@jakarta.apache.org Received: (qmail 33037 invoked by uid 500); 20 Dec 2004 10:50:49 -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 33003 invoked by uid 99); 20 Dec 2004 10:50:47 -0000 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received-SPF: pass (hermes.apache.org: local policy) Received: from Unknown (HELO ehatchersolutions.com) (69.55.225.129) by apache.org (qpsmtpd/0.28) with ESMTP; Mon, 20 Dec 2004 02:50:42 -0800 Received: by ehatchersolutions.com (Postfix, from userid 504) id 8D06813E2009; Mon, 20 Dec 2004 05:50:33 -0500 (EST) Received: from [192.168.1.101] (va-chrvlle-cad1-bdgrp1-4b-b-169.chvlva.adelphia.net [68.169.41.169]) by ehatchersolutions.com (Postfix) with ESMTP id 3E9B613E2007 for ; Mon, 20 Dec 2004 05:50:29 -0500 (EST) Mime-Version: 1.0 (Apple Message framework v619) In-Reply-To: <20041219220558.94528.qmail@web41210.mail.yahoo.com> References: <20041219220558.94528.qmail@web41210.mail.yahoo.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Message-Id: Content-Transfer-Encoding: quoted-printable From: Erik Hatcher Subject: Re: Optimising A Security Filter Date: Mon, 20 Dec 2004 05:50:28 -0500 To: "Lucene Users List" X-Mailer: Apple Mail (2.619) X-Spam-Checker-Version: SpamAssassin 3.0.1 (2004-10-22) on javelina X-Spam-Status: No, score=-2.0 required=5.0 tests=AWL,BAYES_00, RCVD_IN_NJABL_DUL,RCVD_IN_SORBS_DUL autolearn=no version=3.0.1 X-Spam-Level: X-Virus-Checked: Checked X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N Paul already replied, but I'll add my thoughts below to the thread=20 also... On Dec 19, 2004, at 5:05 PM, Steve Skillcorn wrote: > I bought the Lucene in Action ebook, which is > excellent and I can strongly recommend. Thank you!!!! > Does the IndexReader that is passed to the =93bits=94 > method of the filter represent the entire index, or > just the results that match the query? It represents the entire index at the time it was instantiated. This=20 is important to know in case documents are later added to the index. > Is not worrying about filters and simply checking the > returned Hit List before presenting a sensible > approach? It depends. Is the performance of checking a relational database for=20 the results being shown to the user acceptable? Is the security risk=20 of a new piece of code forgetting to check the results of a search=20 worth it? > I can see the point to filters as presented in the > Lucene in Action ISBN example, but are they a good > approach where they could end up laboriously marking > the entire index as True? Iterating through every document in the index certainly is time=20 consuming and not something you should do for every search. However,=20 filters are designed to be long-lived. Write your filter to simply do=20= the logic of checking each document against the database, then wrap=20 your filter with the caching wrapper. Be sure to use the same=20 IndexReader for each search. When the index changes, rebuild the=20 filter. There is no clear best way to do this type of filtering of results, I=20 don't believe. There are details to consider for either of these=20 approaches. > All help greatly appreciated. Thanks to the authors > for Lucene in Action, it's given me the high level > best practices I was needing. Steve - I really appreciate hearing this. Putting this work to public=20= scrutiny opens the possibilities of opinion. Your comments hearten me. Erik --------------------------------------------------------------------- To unsubscribe, e-mail: lucene-user-unsubscribe@jakarta.apache.org For additional commands, e-mail: lucene-user-help@jakarta.apache.org