opensearch-project / opensearch-project/opensearch-java

[BUG] There is no "output_format" in DateProcessor ingest pipeline

Open
#1,512 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
Java
Stars
165
Forks
250
Avg merge
1d 18h
Merged PRs (30d)
26

Description

What is the bug?

As stated in the document: https://opensearch.org/docs/latest/ingest-pipelines/processors/date/
There should be a property for output_format on DateProcesser ingest on opensearch-java library but there is none.

How can one reproduce the bug?

use latest library from mvn:

<dependency>
    <groupId>org.opensearch.client</groupId>
    <artifactId>opensearch-java</artifactId>
    <version>2.22.0</version>
</dependency>

How can I create a pipeline like this in java?

{
  "description": "Convert date string to epoch millis",
  "processors": [
    {
      "date": {
        "field": "start_time",
        "formats": ["date_time"],
        "output_format": "epoch_millis",
        "target_field": "start_time"
      }
    }
  ]
}
What is the expected behavior?

should support output_format for the DateProcessor

Is there at least a workaround for this?

Contributor guide

Open the contributing guide

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

Start with the DateProcessor API in the opensearch-java 2.22.0 client and compare its supported properties with the OpenSearch date processor documentation. Reproduce the pipeline shown in the issue; done means a Java pipeline can set output_format to epoch_millis and serialize it correctly.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
api, backend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.