lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Erik Hatcher <e...@ehatchersolutions.com>
Subject Re: Newbie questions
Date Fri, 11 Feb 2005 18:53:13 GMT
On Feb 11, 2005, at 1:36 PM, Erik Hatcher wrote:
>> 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]

oops, to be completely technically correct, use curly brackets to get > 
rather than >=

	degree:cs AND gpa:{3.0 TO 9.9}

(I'll assume GPA's only go to 4.0 or 5.0 :)

	Erik


---------------------------------------------------------------------
To unsubscribe, e-mail: lucene-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: lucene-user-help@jakarta.apache.org


Mime
View raw message