[ 
https://issues.apache.org/jira/browse/SOLR-741?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13695095#comment-13695095
 ] 

Jack Krupansky commented on SOLR-741:
-------------------------------------

As a temporary workaround, a StatelessScript update processor can be used to 
execute a concise JavaScript script to perform the desired date rounding. I 
just coded one today (normalize-date.js) which will appear in the next early 
access release of my book at the end of next week. It lets you specify the unit 
of truncation (no "rounding"), from second to decade. It also "normalizes" 
abbreviated dates such as "2012", "2012-04-15", and missing "Z". It works for 
multivalued data fields as well.
                
> Add support for rounding dates in DateField
> -------------------------------------------
>
>                 Key: SOLR-741
>                 URL: https://issues.apache.org/jira/browse/SOLR-741
>             Project: Solr
>          Issue Type: Improvement
>          Components: search
>    Affects Versions: 1.4
>            Reporter: Shalin Shekhar Mangar
>            Priority: Minor
>             Fix For: 4.4
>
>
> As discussed at http://www.nabble.com/Rounding-date-fields-td19203108.html
> Since rounding dates to a coarse value is an often recommended solution to 
> decrease number of unique terms, we should add support for doing this in 
> DateField itself. A number of syntax were proposed, some of them were:
> # <fieldType name="date" class="solr.DateField" 
> sortMissingLast="true"omitNorms="true" roundTo="-1MINUTE" /> (Shalin)
> # <fieldType name="date" class="solr.DateField" sortMissingLast="true" 
> omitNorms="true" round="DOWN_MINUTE" /> (Otis)
> Hoss proposed more general enhancements related to arbitary pre-processing of 
> values prior to indexing/storing using pre-processing analyzers.
> This issue aims to build a consensus on the solution to pursue and to 
> implement that solution inside Solr.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org
For additional commands, e-mail: dev-h...@lucene.apache.org

Reply via email to