Return-Path: Delivered-To: apmail-jakarta-lucene-user-archive@www.apache.org Received: (qmail 73785 invoked from network); 11 Feb 2005 18:36:40 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur-2.apache.org with SMTP; 11 Feb 2005 18:36:40 -0000 Received: (qmail 61675 invoked by uid 500); 11 Feb 2005 18:36:36 -0000 Delivered-To: apmail-jakarta-lucene-user-archive@jakarta.apache.org Received: (qmail 61429 invoked by uid 500); 11 Feb 2005 18:36:35 -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 61411 invoked by uid 99); 11 Feb 2005 18:36:35 -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; Fri, 11 Feb 2005 10:36:33 -0800 Received: by ehatchersolutions.com (Postfix, from userid 504) id 184BB13E28FF; Fri, 11 Feb 2005 13:36:30 -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 57EB013E28FE for ; Fri, 11 Feb 2005 13:36:10 -0500 (EST) Mime-Version: 1.0 (Apple Message framework v619.2) In-Reply-To: <20050210220056.48213.qmail@web90103.mail.scd.yahoo.com> References: <20050210220056.48213.qmail@web90103.mail.scd.yahoo.com> Content-Type: text/plain; charset=US-ASCII; format=flowed Message-Id: <7e009ae173a4a70af3cfc3cd83f7f9b4@ehatchersolutions.com> Content-Transfer-Encoding: 7bit From: Erik Hatcher Subject: Re: Newbie questions Date: Fri, 11 Feb 2005 13:36:07 -0500 To: "Lucene Users List" X-Mailer: Apple Mail (2.619.2) X-Spam-Checker-Version: SpamAssassin 3.0.1 (2004-10-22) on javelina X-Spam-Status: No, score=-3.5 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.0.1 X-Spam-Level: X-Virus-Checked: Checked X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N On Feb 10, 2005, at 5:00 PM, Paul Jans wrote: > A couple of newbie questions. I've searched the > archives and read the Javadoc but I'm still having > trouble figuring these out. Don't forget to get your copy of "Lucene in Action" too :) > 1. What's the best way to index and handle queries > like the following: > > Find me all users with (a CS degree and a GPA > 3.0) > or (a Math degree and a GPA > 3.5). Some suggestions: index degree as a Keyword field. Pad GPA, so that all of them are the form #.# (or #.## maybe). Numerics need to be lexicographically ordered, and thus padded. With the right analyzer (see the AnalysisParalysis page on the wiki) you could use this type of query with QueryParser:' degree:cs AND gpa:[3.0 TO 9.9] > 2. What are the best practices for using Lucene in a > clustered J2EE environment? A standalone index/search > server or storing the index in the database or > something else ? There is a LuceneRAR project that is still in its infancy here: https://lucenerar.dev.java.net/ You can also store a Lucene index in Berkeley DB (look at the /contrib/db area of the source code repository) However, most projects do fine with "cruder" techniques such as sharing the Lucene index on a common drive and ensuring that locking is configured to use the common drive also. Erik --------------------------------------------------------------------- To unsubscribe, e-mail: lucene-user-unsubscribe@jakarta.apache.org For additional commands, e-mail: lucene-user-help@jakarta.apache.org