Use RangeQuery to search on the date field -----Original Message----- From: host unknown [mailto:[EMAIL PROTECTED] Sent: Friday, June 27, 2003 10:39 AM To: [EMAIL PROTECTED] Subject: date ranges.....
Hi all Here's my scenario.... I'm building a calendaring application and using Lucene (one of many times I've used it on our site) for the indexing/retrieval mechanism. The calendar has events. An event consists of: start date, end date, start time, end time, and descriptive information. Most begin and end on the same day, however not all of them. Here's where the problem lies. Let's say an event runs from 20030625 (june 25 2003) until 20030701 and I want to search all events (several thousand) and know what's happening today (20030727). The results I'm looking for can be described with this sql statement: "Select * from events where start_date <= 20030627 and end_date >=20030627". How do i write this 'query' with Lucene? Many thanks, Dominic _________________________________________________________________ Protect your PC - get McAfee.com VirusScan Online http://clinic.mcafee.com/clinic/ibuy/campaign.asp?cid=3963 --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
