You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by lu...@jakarta.apache.org on 2004/05/20 23:52:37 UTC

[Jakarta Lucene Wiki] Updated: IndexingDateFields

   Date: 2004-05-20T14:52:37
   Editor: 12.40.184.2 <>
   Wiki: Jakarta Lucene Wiki
   Page: IndexingDateFields
   URL: http://wiki.apache.org/jakarta-lucene/IndexingDateFields

   no comment

Change Log:

------------------------------------------------------------------------------
@@ -1 +1,3 @@
 If only year, month, day are relevant to your situation, index the text string "YYYYMMDD" as Field.Keyword, rather than using DateField or Field.Keyword(String, Date).  Why?  Because RangeQuery will expand into a BooleanQuery of all terms in the range, and DateField represents down to the millisecond level and can expand into more terms than are allowed in a BooleanQuery.
+
+Another reason to do this is that you will be able to index dates before the Unix Epoch (Jan 1, 1970) which DateField cannot handle (as of Lucene 1.3; I do not know what's in the works for later versions).

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