I've been searching on the net for how to handle dates, but none seem to be 
working.  Here's what I'm doing.  Suppose I have a field "StartDate".  When I 
create the index, I'm populating it with something like this:

DateTime dtStartDate;
doc.Add(new Field("StartDate", dtStartDate.ToString(), Field.Store.YES, 
Field.Index.UN_TOKENIZED);
...

Now, I'm using the Luke tool to view the index.  The date appears in the doc as 
a full string, for example,  "2/21/2009 12:00:00AM".  This is to be expected 
since I used UN_TOKENIZED, correct?

How do I go about searching for 1) StartDate with the exact starting date 2) A 
range?

1) StartDate:"2/21/2009 12:00:00AM"
This doesn't even find the exact entry.  Not sure what's going on here.

2) StartDate:[2/21/2009 TO 2/24/2009]
StartDate:[2009/2/21 TO 2009/2/24]

None of the above works...can someone point out how I should be handling this?  
From indexing to the search query...

Thanks.

Reply via email to