You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "Alexander Block (JIRA)" <ji...@apache.org> on 2014/08/25 13:36:58 UTC

[jira] [Created] (SOLR-6430) Date sort order for null and dates < 1970 is wrong

Alexander Block created SOLR-6430:
-------------------------------------

             Summary: Date sort order for null and dates < 1970 is wrong
                 Key: SOLR-6430
                 URL: https://issues.apache.org/jira/browse/SOLR-6430
             Project: Solr
          Issue Type: Bug
    Affects Versions: 4.9
            Reporter: Alexander Block


I have a date field as follows:

<field name="ETD" type="date" indexed="true" stored="true" multiValued="false" />
...
<fieldType name="date" class="solr.TrieDateField" precisionStep="0" positionIncrementGap="0"/>

In my data set I have unset fields (null), dates which are pre EPOCH (e.g. 1930-02-13T23:00:00Z) and dates which are post EPOCH (e.g. 2000-12-31T23:00:00Z). When sorting in ascending order, I would expect the null fields to be considered the ones with the lowest values, for example:
null
1930-02-13T23:00:00Z
2000-12-31T23:00:00Z

What I get however is:
1930-02-13T23:00:00Z
null
2000-12-31T23:00:00Z

It looks like null is not handled as the lowest possible value for a date field.



--
This message was sent by Atlassian JIRA
(v6.2#6252)

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