すべてのプロダクト
Search
ドキュメントセンター

OpenSearch:スキーマ

最終更新日:Jan 17, 2026

説明

OpenSearch アプリケーションのスキーマ。

{
    "tables": {
        "main": {
            "primaryTable": true,
            "name": "main",
            "fields": {
                "id": {
                    "name": "id",
                    "type": "LITERAL",
                    "primaryKey": true
                },
                "title": {
                    "name": "title",
                    "type": "TEXT",
                    "primaryKey": false
                },
                "buy": {
                    "name": "buy",
                    "type": "INT",
                    "primaryKey": false
                },
                "cate_id": {
                    "name": "cate_id",
                    "type": "INT",
                    "primaryKey": false
                },
                "cate_name": {
                    "name": "cate_name",
                    "type": "LITERAL",
                    "primaryKey": false
                }
            }
        }
    },
    "indexes": {
        "searchFields": {
            "id": {
                "fields": [
                    "id"
                ]
            },
            "default": {
                "fields": [
                    "title"
                ],
                "analyzer": "chn_standard"
            },
            "cate_name": {
                "fields": [
                    "cate_name"
                ]
            }
        },
        "filterFields": [
            "id",
            "buy",
            "cate_id",
            "cate_name"
        ]
    }
}

構造

フィールド

タイプ

説明

tables

オブジェクト

テーブルスキーマ

tables.*

オブジェクト

特定のテーブルスキーマの詳細については、後述の `Table*` セクションをご参照ください。

indexes

オブジェクト

インデックススキーマ: 詳細については、後述の Index セクションをご参照ください。

テーブル

{
    "primaryTable": true,
    "name": "main",
    "fields": {
        "id": {
            "name": "id",
            "type": "LITERAL",
            "primaryKey": true
        },
        "title": {
            "name": "title",
            "type": "TEXT",
            "primaryKey": false
        },
        "buy": {
            "name": "buy",
            "type": "INT",
            "primaryKey": false
        },
        "cate_id": {
            "name": "cate_id",
            "type": "INT",
            "primaryKey": false
        },
        "cate_name": {
            "name": "cate_name",
            "type": "LITERAL",
            "primaryKey": false
        }
    }
}

構造

フィールド

タイプ

説明

fields

オブジェクト

フィールド構造

fields.*

オブジェクト

フィールドの詳細については、後述の説明をご参照ください。 `Field*` はフィールド名を示します。

primaryTable

ブール値

テーブルがプライマリテーブルかどうかを示します。

name

文字列

テーブルの名前。

フィールド

{
  "name": "json_nested",
  "type": "NESTED",
  "primaryKey": false,
  "innerSchema": {
    "job": {
      "name": "job",
      "type": "TEXT",
      "primaryKey": false
    },
    "ssn": {
      "name": "ssn",
      "type": "LITERAL",
      "primaryKey": false
    }
  }
}

構造

フィールド

タイプ

説明

type

String

フィールドタイプです。 フィールドの詳細については、「アプリケーションスキーマ」をご参照ください。

name

String

フィールド名です。

primaryKey

Boolean

フィールドがプライマリキーであるかどうかを指定します。

joinWith

Array

リンクされた外部データテーブルを収集します。

innerSchema

Object

フィールドタイプが OBJECT または NESTED の場合のデータ構造を指定します。 ネストがサポートされています。

インデックス

{
    "searchFields": {
      "default": {
        "fields": [
          "title"
        ],
        "analyzer": "chn_standard"
      },
      "id": {
        "fields": [
          "id"
        ]
      }
    },
    "filterFields": [
      "id"
    ]
}

構造

フィールド

タイプ

説明

filterFields

配列

属性フィールドのリスト。

searchFields

オブジェクト

インデックスフィールド

searchFields.*

オブジェクト

インデックスフィールドの詳細。詳細については、このトピックの「SearchField」セクションを参照してください。アスタリスク (*) はインデックスフィールドの名前を示します。

SearchField

{
  "fields": ["title"],
  "analyzer": "chn_standard"
}

構造

フィールド

タイプ

説明

fields

配列

インデックスフィールドのリスト。

analyzer

文字列

アナライザーの名前 (カスタムアナライザーまたは組み込みアナライザーなど)。詳細については、カスタムアナライザーおよび組み込みアナライザーを参照してください。

組み込みアナライザー

アナライザー

説明

chn_standard

中国語:汎用分析

simple

シンプル分析

chn_single

単一の漢字用のアナライザー。

eng_standard

英語の単語をステミングするためのアナライザー。

eng_nostem

英語 - ステミングなし

fuzzy

あいまい分析

keyword

キーワード

chn_ecommerce

中国 E コマース分析

chn_film

中国語動画分析

chn_scene_name

中国語人名分析

chn_scene_org

中国語の組織名用のアナライザー。

first_letter

簡単なピンインスペル用のアナライザー。

full_pinyin

完全なピンインスペル用のアナライザー。

numeric

数値分析

geo

地理位置分析

chn_it_content

IT コンテンツ分析