Return-Path: Delivered-To: apmail-lucene-java-user-archive@www.apache.org Received: (qmail 97102 invoked from network); 7 Feb 2006 15:25:56 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 7 Feb 2006 15:25:56 -0000 Received: (qmail 16232 invoked by uid 500); 7 Feb 2006 15:25:47 -0000 Delivered-To: apmail-lucene-java-user-archive@lucene.apache.org Received: (qmail 16136 invoked by uid 500); 7 Feb 2006 15:25:46 -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 16057 invoked by uid 99); 7 Feb 2006 15:25:46 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 07 Feb 2006 07:25:46 -0800 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: local policy) Received: from [69.55.225.129] (HELO ehatchersolutions.com) (69.55.225.129) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 07 Feb 2006 07:25:45 -0800 Received: by ehatchersolutions.com (Postfix, from userid 504) id DE18733CBDF; Tue, 7 Feb 2006 10:25:24 -0500 (EST) Received: from [128.143.167.108] (d-128-167-108.bootp.Virginia.EDU [128.143.167.108]) by ehatchersolutions.com (Postfix) with ESMTP id 8430833CBDE for ; Tue, 7 Feb 2006 10:25:22 -0500 (EST) Mime-Version: 1.0 (Apple Message framework v746.2) In-Reply-To: <43E839B5.60300@nuix.com.au> References: <43E839B5.60300@nuix.com.au> Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed Message-Id: <5ACC7DF3-B9C0-4781-B7BA-20F374ED0B9F@ehatchersolutions.com> Content-Transfer-Encoding: 7bit From: Erik Hatcher Subject: Re: Queries not derived from the text index Date: Tue, 7 Feb 2006 10:25:18 -0500 To: java-user@lucene.apache.org X-Mailer: Apple Mail (2.746.2) X-Spam-Checker-Version: SpamAssassin 3.0.1 (2004-10-22) on javelina X-Spam-Level: X-Virus-Checked: Checked by ClamAV on apache.org X-Old-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00 autolearn=ham version=3.0.1 X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N On Feb 7, 2006, at 1:09 AM, Daniel Noll wrote: > I've got an unusual (if not crazy) question about implementing > custom queries. > > Basically we have a UI where a user can enter a query and then > select a bunch of filters to be applied to the query. These > filters are currently implemented using a fairly simple wrapper > around Lucene's own Filter class. > > Now we have one particular customer who says he wants to AND and OR > these filters in various combinations. Now, I know that this is > possible on the model side, because I've already created AndFilter > and OrFilter classes to do this sort of thing. However, the view > of the user interface would be impossible to keep simple if I were > to bulk it up to support this kind of filtering. One thing that may be of use is the ChainedFilter: http://svn.apache.org/repos/asf/lucene/java/trunk/contrib/ miscellaneous/src/java/org/apache/lucene/misc/ChainedFilter.java > Is it possible to customise the QueryParser so that it returns > Query instances that have no relationship to the text index > whatsoever? For instance, many of our existing filters build their > bitsets exclusively using a database, and we would need to keep > this as-is because we don't want to modify the text index itself. I don't really follow what you're after here. Could you give a concrete example of what you're after with "query" parsing? It's certainly feasible to build a custom parser (JavaCC or otherwise) that does whatever you want, but that can be quite a complex endeavor. Erik --------------------------------------------------------------------- To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org For additional commands, e-mail: java-user-help@lucene.apache.org