elastic/elasticsearch

Dynamic mappings fail when a single document generates inconsistent mapping updates

オープン

#15,377 opened on 2015/12/10

 (12 件のコメント) (2 件のリアクション) (0 人の担当者)Java (25,882 件のフォーク)batch import
:Search Foundations/Mapping>docsTeam:DocsTeam:Search Foundationshelp wanted

Repository metrics

Stars
 (76,700 個のスター)
PR merge metrics
 (平均マージ 2d) (30d で 1,000 merged PRs)

説明

For instance indexing the following document would fail if the foo.bar field is not mapped explicitly:

{
  "foo": [
    {
      "bar": "baz"
    },
    {
      "bar": 42
    }
  ]
}

The reason is that mapping updates for the 2 sub documents are generated independently (one triggers the creation of a string field and the other one of a long field) but they can't be reconciliated in order to generate the mapping update that will be sent to the master node.

Bug report courtesy of Benjamin Gathmann at https://discuss.elastic.co/t/coerce-long-to-double-not-working/36882.

コントリビューターガイド