[ 
https://issues.apache.org/jira/browse/LUCENE-1361?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12625471#action_12625471
 ] 

Hoss Man commented on LUCENE-1361:
----------------------------------

to clarify: the DateFormat used by QueryParser when dealing with RangeQueries 
is currently controlled by calling setLocale ... it's not actually necessary to 
override the getRangeQuery method.

but that doesn't mean allowing an explicit DateFormat to be set is a bad idea.

> 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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to