How to do RangeQuery on a Computed Value of a Field?

2007-10-20 Thread Johnny R. Ruiz III
Hi All, I was looking for a way to do a range query on 2 numeric field of my index. The tricky part is, I don't directly use the numeric field but I have to use it on a computation formula to satisfy my criteria. Hope this helps to explain my scenario: pointX--> latitude X input by user.

Re: How to do RangeQuery on a Computed Value of a Field?

2007-10-21 Thread Doron Cohen
You could use ValueSourceQuery for this - see o.a.l.search.function. The trick is to create your ValueSource class that is using two FieldCacheSource objects - one for each location. See http://issues.apache.org/jira/browse/LUCENE-1019 for a related example. Note however that this solution would

Re: How to do RangeQuery on a Computed Value of a Field?

2007-10-21 Thread Erick Erickson
There's also an example of something very similar in Lucene In Action. Erick On 10/20/07, Johnny R. Ruiz III <[EMAIL PROTECTED]> wrote: > > Hi All, > > I was looking for a way to do a range query on 2 numeric field of my > index. The tricky part is, I don't directly use the numeric field but I >

Re: How to do RangeQuery on a Computed Value of a Field?

2007-10-21 Thread Johnny R. Ruiz III
ect: Re: How to do RangeQuery on a Computed Value of a Field? There's also an example of something very similar in Lucene In Action. Erick On 10/20/07, Johnny R. Ruiz III <[EMAIL PROTECTED]> wrote: > > Hi All, > > I was looking for a way to do a range query on 2 numeric fi