Modified: src/java/org/apache/lucene/document DateField.java Field.java src/java/org/apache/lucene/queryParser QueryParser.jj src/test/org/apache/lucene/queryParser TestQueryParser.java Log: Support for new range query syntax. The delimiter is " TO ", but is optional for backward compatibility with previous syntax. If the range arguments match the format supported by DateFormat.getDateInstance(DateFormat.SHORT), then they will be converted into the appropriate date strings a la DateField.

/** A field is a section of a Document. Each field has two parts, a name and a @@ -89,6 +90,13 @@ fields, like "title" or "subject". */ public static final Field Text(String name, String value) { return new Field(name, value, true, true, true); + } + + /** Constructs a Date-valued Field that is tokenized and indexed, + and is stored in the index, for return with hits. Useful for short text + fields, like "title" or "subject". */ + public static final Field Keyword(String name, Date value) { + return new Field(name, DateField.dateToString(value), true, true, true); }