Torsten:
This is not the exact answer to your original question, but Otis had a
"bookmark" / "tag" on one those Internet bookmark boards for efficient date
range searches in large indexes. I found it once while searching for date range
queries on Google, but could not find it again.
If you can find that link somehow, it really has some very good information on
fast searches when searching for a date range.
Thanks
Saurabh
----------------------------------------
Return-Path: <[EMAIL PROTECTED]> Tue Oct 03 04:21:24 2006
Received: from hermes.apache.org [209.237.227.199] by
maila25.webcontrolcenter.com with SMTP;
Tue, 3 Oct 2006 04:21:24 -0700
Received: (qmail 65315 invoked by uid 500); 3 Oct 2006 11:21:22 -0000
Received: (qmail 65268 invoked by uid 99); 3 Oct 2006 11:21:22 -0000
Received: from idunn.apache.osuosl.org (HELO idunn.apache.osuosl.org)
(140.211.166.84)
by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 03 Oct 2006 04:21:22 -0700
Received: from [213.165.64.20] ([213.165.64.20:53304] helo=mail.gmx.net)
by idunn.apache.osuosl.org (ecelerity 2.1.1.8 r(12930)) with ESMTP
id 10/6B-29668-78742254 for <[email protected]>; Tue, 03 Oct
2006 04:21:08 -0700
Received: (qmail invoked by alias); 03 Oct 2006 11:18:00 -0000
Received: from p549C40ED.dip0.t-ipconnect.de (EHLO MOB217) [84.156.64.237]
by mail.gmx.net (mp032) with SMTP; 03 Oct 2006 13:18:00 +0200
Mailing-List: contact [EMAIL PROTECTED]; run by ezmlm
Precedence: bulk
List-Help: <mailto:[EMAIL PROTECTED]>
List-Unsubscribe: <mailto:[EMAIL PROTECTED]>
List-Post: <mailto:[email protected]>
List-Id: <lucene-net-user.incubator.apache.org>
Reply-To: [email protected]
Delivered-To: mailing list [email protected]
X-ASF-Spam-Status: No, hits=0.0 required=5.0 tests=
X-Authenticated: #6569119
From: "Torsten Rendelmann" <[EMAIL PROTECTED]>
To: <[email protected]>,
<[email protected]>
Subject: How to use a field for date/time range searches
Date: Tue, 3 Oct 2006 13:17:57 +0200
Message-ID: <[EMAIL PROTECTED]>
MIME-Version: 1.0
Content-Type: text/plain;
charset="us-ascii"
Content-Transfer-Encoding: 7bit
X-Mailer: Microsoft Office Outlook 11
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2962
Thread-Index: AcbkmNSCd6zYC1D0Tt67JW1M+LO7PAAABQWQAJDYRrA=
In-Reply-To: <[EMAIL PROTECTED]>
X-Y-GMX-Trusted: 0
X-Rcpt-To: <[EMAIL PROTECTED]>
X-SmarterMail-Spam: SPF_Pass
Hello all,
I try to figure out how to use a field for date/time range searches.
As the docs (http://www.dotlucene.net/documentation/QuerySyntax.html)
states,
I used to add this line within my Lucene.Document Create() function:
...
doc.Add(Field.Keyword("date", item.Date));
...
Where item.Date is a DateTime object containing a UTC(!) date and time.
I used Luke to test the search: I provided "date:{20060901 TO 20061001}"
in
the search input tab, but no result is returned (but there must be
results).
My questions:
Q1. Is my query correct?
Q2. Do I have to change impl., to get it work?
Q3. What happens with the provided DateTime? Hopefully there is no
TimeZone.UtcOffset() substraction handling inside?
Q4. How do I search for time? E.g. an item posted in the last hour...
The version I used is Lucene.Net-1.9.1-002-29Sep06.src.zip
TorstenR