lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Erik Hatcher <>
Subject Re: Newbie questions
Date Fri, 11 Feb 2005 18:36:07 GMT

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:

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.


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message