document the slightly confusing situation of parsing dates in range queries

git-svn-id: https://svn.apache.org/repos/asf/lucene/java/trunk@369559 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Daniel Naber 2006-01-16 20:09:48 +00:00
parent bc4581f6d9
commit 5a8e468d3c
2 changed files with 18 additions and 0 deletions

View File

@ -45,6 +45,15 @@ import org.apache.lucene.util.Parameter;
* documentation</a>.
* </p>
*
* <p>In {@link RangeQuery}s, QueryParser tries to detect date values, e.g. <tt>date:[6/1/2005 TO 6/4/2005]</tt>
* produces a range query that searches for "date" fields between 2005-06-01 and 2005-06-04. Note
* that the format of the accpeted input depends on {@link #setLocale(Locale) the locale}. This
* feature also assumes that your index uses the {@link DateField} class to store dates.
* If you use a different format (e.g. {@link DateTools}) and you still want QueryParser
* to turn local dates in range queries into valid queries you need to create your own
* query parser that inherits QueryParser and overwrites
* {@link #getRangeQuery(String, String, String, boolean)}.</p>
*
* <p>Note that QueryParser is <em>not</em> thread-safe.</p>
*
* @author Brian Goetz

View File

@ -68,6 +68,15 @@ import org.apache.lucene.util.Parameter;
* documentation</a>.
* </p>
*
* <p>In {@link RangeQuery}s, QueryParser tries to detect date values, e.g. <tt>date:[6/1/2005 TO 6/4/2005]</tt>
* produces a range query that searches for "date" fields between 2005-06-01 and 2005-06-04. Note
* that the format of the accpeted input depends on {@link #setLocale(Locale) the locale}. This
* feature also assumes that your index uses the {@link DateField} class to store dates.
* If you use a different format (e.g. {@link DateTools}) and you still want QueryParser
* to turn local dates in range queries into valid queries you need to create your own
* query parser that inherits QueryParser and overwrites
* {@link #getRangeQuery(String, String, String, boolean)}.</p>
*
* <p>Note that QueryParser is <em>not</em> thread-safe.</p>
*
* @author Brian Goetz