lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From lucene-...@jakarta.apache.org
Subject [Jakarta Lucene Wiki] Updated: IndexingDateFields
Date Sat, 14 Aug 2004 15:19:24 GMT
   Date: 2004-08-14T08:19:24
   Editor: DanielNaber <daniel.naber@t-online.de>
   Wiki: Jakarta Lucene Wiki
   Page: IndexingDateFields
   URL: http://wiki.apache.org/jakarta-lucene/IndexingDateFields

   no comment

Change Log:

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

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


Mime
View raw message