2
1

はじめに

開発でOpen Searchを使っているのですが、その中で引っかかった内容があったためブログ記事にまとめます。

発生した事象

AppSyncでOpenSearchを使用したときに取得できるデータとできないデータがありました。
ログを調査したところ以下のようなエラーが発生していました。

"status": 400,
        "error": {
            "type": "mapper_parsing_exception",
            "reason": "failed to parse field [salesEndDate] of type [date] in document with id '3a31a493-0dd3-495d-a5e1-cbcab96e0798'. Preview of field's value: '2025/07/02'",

DBの日にちデータを2025/07/02としていたためエラーが発生していました。
日付をOpensearchが認識する形式に変換する必要があります。

2025/07/02 →  2025-07-02

日にちのデータを「/」で持つことは多いと思うので意外な落とし穴にご注意ください!

2
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
2
1