You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@lucene.apache.org by "Kainth, Sachin" <Sa...@atkinsglobal.com> on 2007/02/26 16:17:15 UTC

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. 

Re: Date Searches

Posted by Chris Hostetter <ho...@fucit.org>.
: Date: Mon, 26 Feb 2007 15:17:15 -0000

: Anybody?

: > Sent:	26 February 2007 13:36


the java-user list is good -- but amazingly enough it's not unheard of for
two *whole* hours to go by without getting a direct response to a
question -- particularly when the last question/answer posted to the list
prior to your question was directly on topic: searching by dates, and
how to format the dates so that they would be in lexigraphic order...

http://www.nabble.com/how-to-query-range-of-Date-by-given-date-string--tf3291956.html

...patience is a must when asking for help from others.

in general, if you'd searched the list archive before posting, you
probably would have had your answer immediately.


-Hoss


---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org