lucene-general mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Kipping, Peter" <>
Subject RE: searching between two fields
Date Tue, 26 Apr 2005 20:24:12 GMT
Is it possible to view the archives of java-user@lucene on the web?  It
looked like it was no longer on the lucene web site, that's why I was
using general@lucene.  Before when a link to the java-user list was
still there, I kept getting an error trying to view it.


-----Original Message-----
From: Erik Hatcher [] 
Sent: Tuesday, April 26, 2005 2:07 PM
Subject: Re: searching between two fields

On Apr 26, 2005, at 2:18 PM, Kipping, Peter wrote:
> Suppose I have a document with two fields, min_temp = 100 and max_temp

> =
> 200.  If a user inputs a search value of 150 the document should be
> returned.  Is it possible to make this happen with lucene?


I do this with my work with years.  The data I index has year strings 
like this: "1837-65" but a search for year:1856 will find this 
document.  I do this by expanding the terms indexed so that the year 
field has a term for each year in the range.  In your case, you could 
index a "temp" field with every unit value between 100 and 200 

I recommend you post to java-user@lucene rather than general@lucene.


View raw message