400 failed to parse [pattern]

When I'm trying to migrate by npm data, I'm getting this debug info and error on the end:

Elasticsearch INFO: 2017-10-26T08:23:21Z
  Adding connection to http://localhost:9200/

  up : 1507147503759-change-size-color.js
Elasticsearch DEBUG: 2017-10-26T08:23:21Z
  starting request {
    "method": "PUT",
    "path": "/vue_storefront_catalog1509006201105",
    "query": {}
  }
  

Elasticsearch DEBUG: 2017-10-26T08:23:21Z
  Request complete

Elasticsearch DEBUG: 2017-10-26T08:23:21Z
  starting request {
    "method": "PUT",
    "path": "/vue_storefront_catalog1509006201105/_mapping/product",
    "body": {
      "properties": {
        "size": {
          "type": "integer"
        },
        "price": {
          "type": "double"
        },
        "color": {
          "type": "integer"
        },
        "pattern": {
          "type": "integer"
        },
        "id": {
          "type": "integer"
        },
        "status": {
          "type": "integer"
        },
        "weight": {
          "type": "integer"
        },
        "visibility": {
          "type": "integer"
        },
        "created_at": {
          "type": "date",
          "format": "yyyy-MM-dd HH:mm:ss||yyyy-MM-dd||epoch_millis"
        },
        "updated_at": {
          "type": "date",
          "format": "yyyy-MM-dd HH:mm:ss||yyyy-MM-dd||epoch_millis"
        },
        "description": {
          "type": "text"
        },
        "name": {
          "type": "text"
        }
      }
    },
    "query": {}
  }
  

Elasticsearch DEBUG: 2017-10-26T08:23:21Z
  Request complete

{ acknowledged: true }
Elasticsearch DEBUG: 2017-10-26T08:23:21Z
  starting request {
    "method": "POST",
    "path": "/_reindex",
    "body": {
      "source": {
        "index": "vue_storefront_catalog"
      },
      "dest": {
        "index": "vue_storefront_catalog1509006201105"
      }
    },
    "query": {}
  }
  

Elasticsearch DEBUG: 2017-10-26T08:23:21Z
  Request complete

(node:29518) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): Bad Request :: {"path":"/_reindex","query":{},"body":"{\"source\":{\"index\":\"vue_storefront_catalog\"},\"dest\":{\"index\":\"vue_storefront_catalog1509006201105\"}}","statusCode":400,"response":"{\"took\":480,\"timed_out\":false,\"total\":2136,\"updated\":0,\"created\":999,\"deleted\":0,\"batches\":1,\"version_conflicts\":0,\"noops\":0,\"retries\":{\"bulk\":0,\"search\":0},\"throttled_millis\":0,\"requests_per_second\":-1.0,\"throttled_until_millis\":0,\"failures\":[{\"index\":\"vue_storefront_catalog1509006201105\",\"type\":\"product\",\"id\":\"920\",\"cause\":{\"type\":\"mapper_parsing_exception\",\"reason\":\"failed to parse [pattern]\",\"caused_by\":{\"type\":\"number_format_exception\",\"reason\":\"For input string: \\\"197,199\\\"\"}},\"status\":400}]}"}
(node:29518) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

The ES log:

es1      | [2017-10-26T08:23:21,812][INFO ][o.e.c.m.MetaDataCreateIndexService] [UjenTr7] [vue_storefront_catalog1509006201105] creating index, cause [api], templates [], shards [5]/[1], mappings []
es1      | [2017-10-26T08:23:21,891][INFO ][o.e.c.m.MetaDataMappingService] [UjenTr7] [vue_storefront_catalog1509006201105/bHIoQuqzR7-xV6NgfXwAeQ] create_mapping [product]
es1      | [2017-10-26T08:23:21,927][INFO ][o.e.c.m.MetaDataMappingService] [UjenTr7] [vue_storefront_catalog1509006201105/bHIoQuqzR7-xV6NgfXwAeQ] update_mapping [product]
es1      | [2017-10-26T08:23:21,929][INFO ][o.e.c.m.MetaDataMappingService] [UjenTr7] [vue_storefront_catalog1509006201105/bHIoQuqzR7-xV6NgfXwAeQ] create_mapping [attribute]
es1      | [2017-10-26T08:23:21,954][INFO ][o.e.c.m.MetaDataMappingService] [UjenTr7] [vue_storefront_catalog1509006201105/bHIoQuqzR7-xV6NgfXwAeQ] update_mapping [attribute]
es1      | [2017-10-26T08:23:21,979][INFO ][o.e.c.m.MetaDataMappingService] [UjenTr7] [vue_storefront_catalog1509006201105/bHIoQuqzR7-xV6NgfXwAeQ] update_mapping [attribute]
es1      | [2017-10-26T08:23:21,987][INFO ][o.e.c.m.MetaDataMappingService] [UjenTr7] [vue_storefront_catalog1509006201105/bHIoQuqzR7-xV6NgfXwAeQ] update_mapping [product]
es1      | [2017-10-26T08:23:22,000][INFO ][o.e.c.m.MetaDataMappingService] [UjenTr7] [vue_storefront_catalog1509006201105/bHIoQuqzR7-xV6NgfXwAeQ] update_mapping [attribute]
es1      | [2017-10-26T08:23:22,012][INFO ][o.e.c.m.MetaDataMappingService] [UjenTr7] [vue_storefront_catalog1509006201105/bHIoQuqzR7-xV6NgfXwAeQ] update_mapping [attribute]
es1      | [2017-10-26T08:23:22,045][INFO ][o.e.c.m.MetaDataMappingService] [UjenTr7] [vue_storefront_catalog1509006201105/bHIoQuqzR7-xV6NgfXwAeQ] update_mapping [product]
es1      | [2017-10-26T08:23:22,075][INFO ][o.e.c.m.MetaDataMappingService] [UjenTr7] [vue_storefront_catalog1509006201105/bHIoQuqzR7-xV6NgfXwAeQ] update_mapping [product]

What is the reason of this error?

The reason was invalid mapping type for "pattern" attribute. When I changed it to string it seems to be worked.

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.