Browse files

add millisecond-precision datetime pattern for date field searches.

  • Loading branch information...
Robert Newson
Robert Newson committed Jul 13, 2010
1 parent 131f0e5 commit 4bda2d798c6214af6e71e039ec1135c2678c26cc
Showing with 2 additions and 2 deletions.
  1. +1 −1
  2. +1 −1 src/main/java/com/github/rnewson/couchdb/lucene/couchdb/
@@ -356,7 +356,7 @@ In addition to normal text-based range searches (using the "field:[lower TO uppe
<tr><td>long</td><td>field&lt;long>:[0 TO 100]</td></tr>
<tr><td>float</td><td>field&lt;float>:[0.0 TO 100.0]</td></tr>
<tr><td>double</td><td>field&lt;double>:[0.0 TO 100.0]</td></tr>
-<tr><td>date</td><td>field&lt;date>:[2001-01-01 TO 2010-01-01] or field&lt;date>:[2000-01-01T00:00:00-0500 TO 2010-01-01T00:00:00-0500]</td></tr>
+<tr><td>date</td><td>field&lt;date>:[from TO to] where from and to match any of these patterns: "yyyy-MM-dd'T'HH:mm:ssZ"", "yyyy-MM-dd'T'HH:mm:ss", "yyyy-MM-ddZ", "yyyy-MM-dd", "yyyy-MM-dd'T'HH:mm:ss.SSSZ", "yyyy-MM-dd'T'HH:mm:ss.SSS"</td></tr>
An example numeric range query for spatial searching.
@@ -182,7 +182,7 @@ private static Field field(final String name, final Object value, final ViewSett
public static final String[] DATE_PATTERNS = new String[] { "yyyy-MM-dd'T'HH:mm:ssZ", "yyyy-MM-dd'T'HH:mm:ss", "yyyy-MM-ddZ",
- "yyyy-MM-dd" };
+ "yyyy-MM-dd", "yyyy-MM-dd'T'HH:mm:ss.SSSZ", "yyyy-MM-dd'T'HH:mm:ss.SSS"};
private final int sortField;

0 comments on commit 4bda2d7

Please sign in to comment.