Ok here's some more information on this: Having done this search:
date1:{-9999999999" + " TO " + Date + "} AND " + "date2:{" + Date + " TO 9999999999}"; But the problem is that the range search feature here using Lexicographic and not numeric ranges. Is there a way to use numeric ranges? -----Original Message----- From: Seeta Somagani [mailto:[EMAIL PROTECTED] Sent: 26 February 2007 15:23 To: java-user@lucene.apache.org Subject: RE: Date Searches This might help. http://www.catb.org/~esr/faqs/smart-questions.html -----Original Message----- From: Kainth, Sachin [mailto:[EMAIL PROTECTED] Sent: Monday, February 26, 2007 10:17 AM To: java-user@lucene.apache.org Subject: Date Searches Anybody? > ______________________________________________ > From: Kainth, Sachin > Sent: 26 February 2007 13:36 > To: 'java-user@lucene.apache.org' > Subject: Date searches > > Hi all, > > I have an index in which dates are represented as ranges of two > integers (there are two fields one foreach integer). The two integers > are years. AD dates are represented as a positive integer and BC > dates as a negative one There are three possible types of ranges. > These are listed below with example dates: > > * BC - BC (-2000 - -1000) > * BC - AD (-1000 - 1000) > * AD - AD (1000 - 1200) > > What I want is to have a textbox in which the user enters a year (eg > 1990) and all records for which that date falls within the record's > date range are returned. > > What would be the query syntax for this? > > Cheers This email and any attached files are confidential and copyright protected. If you are not the addressee, any dissemination of this communication is strictly prohibited. Unless otherwise expressly agreed in writing, nothing stated in this communication shall be legally binding. The ultimate parent company of the Atkins Group is WS Atkins plc. Registered in England No. 1885586. Registered Office Woodcote Grove, Ashley Road, Epsom, Surrey KT18 5BW. Consider the environment. Please don't print this e-mail unless you really need to. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] This message has been scanned for viruses by MailControl - (see http://bluepages.wsatkins.co.uk/?6875772) --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]