Indexing of some date values fails

Created on 24 July 2024, 6 months ago
Updated 27 July 2024, 6 months ago

I have an index on content types with various date fields. Some of these date fields can have values quite far in the past (e.g. 1931-01-01).

When I try to index this content, eventually the process will fail midway through:

failed to parse field [field_outforce_date] of type [date] in document with id 'entity:node/51171:de'. Preview of field's value: '-1230724800' Invalid value for Year (valid values -999999999 - 999999999): -1230724800 for id: entity:node/51171:de. Status code: 400

Some googling eventually lead me to these two discussions:

https://forum.opensearch.org/t/negative-epoch-values-failing-to-get-pars...

https://github.com/elastic/elasticsearch/issues/51080#issuecomment-57562...

Basically the solution (workaround?) seems to be to flip the format values in FieldMapper.php from

      'date' => [
        'type' => 'date',
        'format' => 'strict_date_optional_time||epoch_second',
      ],

to

      'date' => [
        'type' => 'date',
        'format' => 'epoch_second||strict_date_optional_time',
      ],

I guess my question is (since this is my first time interacting with OpenSearch): is this a me-problem? Or is this something that should be addressed in the module in some way?

πŸ› Bug report
Status

Needs work

Version

2.1

Component

Code

Created by

πŸ‡©πŸ‡ͺGermany marcoliver Neuss, NRW, Germany

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

Production build 0.71.5 2024