You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "Hoss Man (JIRA)" <ji...@apache.org> on 2014/09/30 20:47:34 UTC

[jira] [Resolved] (SOLR-6490) ValueSourceParser function "max" does not handle dates.

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

Hoss Man resolved SOLR-6490.
----------------------------
    Resolution: Invalid

resolving as invalid since this is currently working as designed -- but see linked issues for discussion of future improvements to give the user more control over this sort of thing.

in your specific case, something like this might work better...

sort=max(ms(date1_field_tdt), ms(date2_field_tdt))

and/or if there is a better "baseline" date (other then the unix epoch) you might want to try the 2 arg form of the ms() function.

> ValueSourceParser function "max" does not handle dates.
> -------------------------------------------------------
>
>                 Key: SOLR-6490
>                 URL: https://issues.apache.org/jira/browse/SOLR-6490
>             Project: Solr
>          Issue Type: Bug
>          Components: query parsers
>            Reporter: Aaron McMillin
>            Priority: Minor
>
> As a user
> when trying to use sort=max(date1_field_tdt, date2_field_tdt)
> I expect documents to be returned in order
> Currently this is not the case. Dates are stored as Long, but max uses MaxFloatFunction which casts them to Floats thereby losing precision.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

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