stac-utils / stac-utils/stac-server

disable date detection mapping by default

Open
#281 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
103
Forks
28
PR merge metrics
No merged PRs in 30d

Description

Currently, ES is configured with the default behavior whereby any strings that pass date detection are mapped to a datetime field. However, this can cause a problem is a dataset is not homogeneous. For example, a collection consisting of date from numerous providers may contain a field that has a value in numerous different datetime formats. If the first Item indexed uses a format the ES can parse to a datetime, the mapping is datetime then. However, some may have unparseable datetimes, which will then cause them to fail.

The fix for this is to set "date_detection: false" in the code where we currently set numeric_detection false.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Inspect the code where numeric_detection is currently set to false. Add the corresponding date_detection setting there, then verify that fields containing mixed or unparseable datetime formats are not automatically mapped as datetime fields.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
databases
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.