Solr
  1. Solr
  2. SOLR-440

Should use longs for internal DateField storage

    Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Major Major
    • Resolution: Duplicate
    • Affects Version/s: 1.2, 1.3
    • Fix Version/s: None
    • Component/s: search
    • Labels:
      None

      Description

      The current DateField implementation uses formatted Strings internally to store dates.

      As a user creating a schema, I assumed that using the DateField type would be more efficient than using an integer field to store seconds. In fact, the DateField type is currently significantly less efficient: ~20 extra bytes are required per value, and String sorting requires that all values fit in memory.

      As soon as sorting on long fields has been implemented (SOLR-324), I'd suggest that the date implementation be switched to use long values internally, representing milliseconds since the epoch in UTC. Unfortunately, this will cause index incompatibilities, so the schema version will need to be bumped.

        Issue Links

          Activity

          Stu Hood created issue -
          Stu Hood made changes -
          Field Original Value New Value
          Link This issue is blocked by SOLR-324 [ SOLR-324 ]
          Hoss Man made changes -
          Link This issue is related to SOLR-544 [ SOLR-544 ]
          Jan Høydahl made changes -
          Status Open [ 1 ] Closed [ 6 ]
          Resolution Duplicate [ 3 ]

            People

            • Assignee:
              Unassigned
              Reporter:
              Stu Hood
            • Votes:
              1 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development