lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Erick Erickson" <erickerick...@gmail.com>
Subject Re: how to query range of Date by given date string?
Date Mon, 26 Feb 2007 13:03:29 GMT
Well, you need to do two things. First, make sure your dates are indexed so
they can be sorted lexically, which the format you're showing is. You might
want to look at the DateTools class for handy methods of transforming dates
into Lucene-friendly format.

Then use RangeQuery or RangeFilter classes to search over a range.

Best
Erick

On 2/26/07, 李寻欢晕菜了 <zhang.xiaoye@gmail.com> wrote:
>
> hello:
> I have Stored Date in index, and how could I query the result by given
> range
> of Date?
> for example:
> I would find some matching result in the range of 2007-02-24 to
> 2007-02-25.
>
>
> --
> --------------------------------------------------------------
> WoCal生活,尽在掌握!
> http://kofwang.wocal.cn
> --------------------------------------------------------------
>
Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message