[ 
https://issues.apache.org/jira/browse/LUCENE-1361?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

David Smiley updated LUCENE-1361:
---------------------------------

    Fix Version/s:     (was: 4.7)
                   4.8

> QueryParser should have a setDateFormat(DateFormat) method
> ----------------------------------------------------------
>
>                 Key: LUCENE-1361
>                 URL: https://issues.apache.org/jira/browse/LUCENE-1361
>             Project: Lucene - Core
>          Issue Type: Improvement
>          Components: core/queryparser
>    Affects Versions: 2.3.2
>            Reporter: ocean
>            Priority: Minor
>             Fix For: 4.8
>
>
> 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 was sent by Atlassian JIRA
(v6.2#6252)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to