You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "Mark Miller (JIRA)" <ji...@apache.org> on 2009/06/11 05:19:07 UTC

[jira] Updated: (LUCENE-1361) QueryParser should have a setDateFormat(DateFormat) method

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

Mark Miller updated LUCENE-1361:
--------------------------------

    Fix Version/s:     (was: 2.9)

If a patch is supplied, we could consider for 2.9, but otherwise I am moving out for now

> 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
>
> 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