QueryParser should have a setDateFormat(DateFormat) method
----------------------------------------------------------
Key: LUCENE-1361
URL: https://issues.apache.org/jira/browse/LUCENE-1361
Project: Lucene - Java
Issue Type: Improvement
Affects Versions: 2.3.2
Reporter: ocean
Priority: Minor
Fix For: 2.3.3
Currently the only way to change the date format used by QueryParser.java is to override the
getRangeQuery method. This seems a bit excessive to me. Since QueryParser isn't threadsafe
(like DateFormat) I would suggest that a DateFormat field be introduced (protected DateFormat
dateFormat) and a setter be introduced (public void setDateFormat(DateFormat format)) so that
it's easier to customize the date format in queries. If there are good reasons against this
(can't imagine, but who knows) why not introduce a protected 'DateFormat:createDateFormat())'
method so that, again, it's easier for clients to override this logic.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: java-dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-dev-help@lucene.apache.org
|