Giter Club home page Giter Club logo

Comments (8)

hunterjamesio avatar hunterjamesio commented on June 15, 2024

I just re-ran the import to about 10,000 products and then manually ran yarn run db rebuild to which my products reduced back down to 996.

This is the output:

** Hello! I am going to rebuild EXISTING ES index to fix the schema
** Creating temporary index vue_storefront_catalog_1544192036
Elasticsearch DEBUG: 2018-12-07T14:13:56Z
  starting request {
    "method": "DELETE",
    "path": "/*/_alias/vue_storefront_catalog_1544192036",
    "query": {}
  }
  

Elasticsearch DEBUG: 2018-12-07T14:13:56Z
  Request complete

Public index alias does not exists [aliases_not_found_exception] aliases [vue_storefront_catalog_1544192036] missing, with { resource.type="aliases" & resource.id="vue_storefront_catalog_1544192036" }
Elasticsearch DEBUG: 2018-12-07T14:13:56Z
  starting request {
    "method": "DELETE",
    "path": "/vue_storefront_catalog_1544192036",
    "query": {}
  }
  

Elasticsearch DEBUG: 2018-12-07T14:13:56Z
  Request complete

Elasticsearch DEBUG: 2018-12-07T14:13:56Z
  starting request {
    "method": "PUT",
    "path": "/vue_storefront_catalog_1544192036",
    "body": {
      "settings": {
        "analysis": {
          "tokenizer": {
            "comma": {
              "type": "pattern",
              "pattern": ","
            }
          },
          "analyzer": {
            "comma": {
              "type": "custom",
              "tokenizer": "comma"
            }
          }
        }
      }
    },
    "query": {}
  }
  

Elasticsearch DEBUG: 2018-12-07T14:13:56Z
  Request complete

{ acknowledged: true,
  shards_acknowledged: true,
  index: 'vue_storefront_catalog_1544192036' }
** Putting the mappings on top of vue_storefront_catalog_1544192036
Elasticsearch DEBUG: 2018-12-07T14:13:56Z
  starting request {
    "method": "PUT",
    "path": "/vue_storefront_catalog_1544192036/_mapping/product",
    "body": {
      "properties": {
        "sku": {
          "type": "keyword"
        },
        "size": {
          "type": "integer"
        },
        "size_options": {
          "type": "integer"
        },
        "price": {
          "type": "float"
        },
        "has_options": {
          "type": "integer"
        },
        "special_price": {
          "type": "float"
        },
        "color": {
          "type": "integer"
        },
        "color_options": {
          "type": "integer"
        },
        "pattern": {
          "type": "text"
        },
        "id": {
          "type": "long"
        },
        "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"
        },
        "special_from_date": {
          "type": "date",
          "format": "yyyy-MM-dd HH:mm:ss||yyyy-MM-dd||epoch_millis"
        },
        "special_to_date": {
          "type": "date",
          "format": "yyyy-MM-dd HH:mm:ss||yyyy-MM-dd||epoch_millis"
        },
        "news_from_date": {
          "type": "date",
          "format": "yyyy-MM-dd HH:mm:ss||yyyy-MM-dd||epoch_millis"
        },
        "news_to_date": {
          "type": "date",
          "format": "yyyy-MM-dd HH:mm:ss||yyyy-MM-dd||epoch_millis"
        },
        "description": {
          "type": "text"
        },
        "name": {
          "type": "text"
        },
        "configurable_children": {
          "properties": {
            "has_options": {
              "type": "boolean"
            },
            "price": {
              "type": "float"
            },
            "sku": {
              "type": "keyword"
            }
          }
        },
        "configurable_options": {
          "properties": {
            "attribute_id": {
              "type": "long"
            },
            "default_label": {
              "type": "text"
            },
            "label": {
              "type": "text"
            },
            "frontend_label": {
              "type": "text"
            },
            "store_label": {
              "type": "text"
            },
            "values": {
              "properties": {
                "default_label": {
                  "type": "text"
                },
                "label": {
                  "type": "text"
                },
                "frontend_label": {
                  "type": "text"
                },
                "store_label": {
                  "type": "text"
                },
                "value_index": {
                  "type": "keyword"
                }
              }
            }
          }
        },
        "category_ids": {
          "type": "long"
        },
        "eco_collection": {
          "type": "integer"
        },
        "eco_collection_options": {
          "type": "integer"
        },
        "erin_recommends": {
          "type": "integer"
        },
        "tax_class_id": {
          "type": "integer"
        },
        "position": {
          "type": "integer"
        },
        "required_options": {
          "type": "integer"
        },
        "Size_options": {
          "type": "keyword"
        },
        "Color_options": {
          "type": "keyword"
        }
      }
    },
    "query": {}
  }
  

Elasticsearch DEBUG: 2018-12-07T14:13:56Z
  Request complete

{ acknowledged: true }
Elasticsearch DEBUG: 2018-12-07T14:13:56Z
  starting request {
    "method": "PUT",
    "path": "/vue_storefront_catalog_1544192036/_mapping/taxrule",
    "body": {
      "properties": {
        "id": {
          "type": "long"
        },
        "rates": {
          "properties": {
            "rate": {
              "type": "float"
            }
          }
        }
      }
    },
    "query": {}
  }
  

Elasticsearch DEBUG: 2018-12-07T14:13:56Z
  Request complete

{ acknowledged: true }
Elasticsearch DEBUG: 2018-12-07T14:13:56Z
  starting request {
    "method": "PUT",
    "path": "/vue_storefront_catalog_1544192036/_mapping/attribute",
    "body": {
      "properties": {
        "id": {
          "type": "long"
        },
        "attribute_id": {
          "type": "long"
        },
        "options": {
          "properties": {
            "value": {
              "type": "text",
              "index": "not_analyzed"
            }
          }
        }
      }
    },
    "query": {}
  }
  

Elasticsearch DEBUG: 2018-12-07T14:13:56Z
  Request complete

{ acknowledged: true }
Elasticsearch DEBUG: 2018-12-07T14:13:56Z
  starting request {
    "method": "PUT",
    "path": "/vue_storefront_catalog_1544192036/_mapping/cms_page",
    "body": {
      "properties": {
        "id": {
          "type": "long"
        },
        "identifier": {
          "type": "keyword"
        },
        "creation_time": {
          "type": "date",
          "format": "yyyy-MM-dd HH:mm:ss||yyyy-MM-dd||epoch_millis"
        },
        "update_time": {
          "type": "date",
          "format": "yyyy-MM-dd HH:mm:ss||yyyy-MM-dd||epoch_millis"
        }
      }
    },
    "query": {}
  }
  

Elasticsearch DEBUG: 2018-12-07T14:13:56Z
  Request complete

{ acknowledged: true }
Elasticsearch DEBUG: 2018-12-07T14:13:56Z
  starting request {
    "method": "PUT",
    "path": "/vue_storefront_catalog_1544192036/_mapping/cms_block",
    "body": {
      "properties": {
        "id": {
          "type": "long"
        },
        "identifier": {
          "type": "keyword"
        },
        "creation_time": {
          "type": "date",
          "format": "yyyy-MM-dd HH:mm:ss||yyyy-MM-dd||epoch_millis"
        },
        "update_time": {
          "type": "date",
          "format": "yyyy-MM-dd HH:mm:ss||yyyy-MM-dd||epoch_millis"
        }
      }
    },
    "query": {}
  }
  

Elasticsearch DEBUG: 2018-12-07T14:13:56Z
  Request complete

{ acknowledged: true }
** We will reindex vue_storefront_catalog with the current schema
Elasticsearch DEBUG: 2018-12-07T14:13:56Z
  starting request {
    "method": "POST",
    "path": "/_reindex",
    "body": {
      "source": {
        "index": "vue_storefront_catalog"
      },
      "dest": {
        "index": "vue_storefront_catalog_1544192036"
      }
    },
    "query": {}
  }
  

Elasticsearch DEBUG: 2018-12-07T14:13:58Z
  Request complete

{ Error: Bad Request
    at respond (/home/fylo/node_modules/elasticsearch/src/lib/transport.js:308:15)
    at checkRespForFailure (/home/fylo/node_modules/elasticsearch/src/lib/transport.js:267:7)
    at HttpConnector.<anonymous> (/home/fylo/node_modules/elasticsearch/src/lib/connectors/http.js:165:7)
    at IncomingMessage.wrapper (/home/fylo/node_modules/lodash/lodash.js:4935:19)
    at IncomingMessage.emit (events.js:187:15)
    at endReadableNT (_stream_readable.js:1092:12)
    at process._tickCallback (internal/process/next_tick.js:63:19)
  status: 400,
  displayName: 'BadRequest',
  message: 'Bad Request',
  path: '/_reindex',
  query: {},
  body:
   { took: 1569,
     timed_out: false,
     total: 8526,
     updated: 0,
     created: 996,
     deleted: 0,
     batches: 1,
     version_conflicts: 0,
     noops: 0,
     retries: { bulk: 0, search: 0 },
     throttled_millis: 0,
     requests_per_second: -1,
     throttled_until_millis: 0,
     failures: [ [Object], [Object], [Object], [Object] ] },
  statusCode: 400,
  response:
   '{"took":1569,"timed_out":false,"total":8526,"updated":0,"created":996,"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_catalog_1544192036","type":"product","id":"445","cause":{"type":"illegal_argument_exception","reason":"mapper [configurable_children.special_price] of different type, current_type [float], merged_type [text]"},"status":400},{"index":"vue_storefront_catalog_1544192036","type":"product","id":"311","cause":{"type":"illegal_argument_exception","reason":"mapper [configurable_children.special_price] of different type, current_type [float], merged_type [text]"},"status":400},{"index":"vue_storefront_catalog_1544192036","type":"product","id":"524","cause":{"type":"illegal_argument_exception","reason":"mapper [configurable_children.special_price] of different type, current_type [float], merged_type [text]"},"status":400},{"index":"vue_storefront_catalog_1544192036","type":"product","id":"580","cause":{"type":"illegal_argument_exception","reason":"mapper [configurable_children.special_price] of different type, current_type [float], merged_type [text]"},"status":400}]}',
  toString: [Function],
  toJSON: [Function] }
{ Error: Bad Request
    at respond (/home/fylo/node_modules/elasticsearch/src/lib/transport.js:308:15)
    at checkRespForFailure (/home/fylo/node_modules/elasticsearch/src/lib/transport.js:267:7)
    at HttpConnector.<anonymous> (/home/fylo/node_modules/elasticsearch/src/lib/connectors/http.js:165:7)
    at IncomingMessage.wrapper (/home/fylo/node_modules/lodash/lodash.js:4935:19)
    at IncomingMessage.emit (events.js:187:15)
    at endReadableNT (_stream_readable.js:1092:12)
    at process._tickCallback (internal/process/next_tick.js:63:19)
  status: 400,
  displayName: 'BadRequest',
  message: 'Bad Request',
  path: '/_reindex',
  query: {},
  body:
   { took: 1569,
     timed_out: false,
     total: 8526,
     updated: 0,
     created: 996,
     deleted: 0,
     batches: 1,
     version_conflicts: 0,
     noops: 0,
     retries: { bulk: 0, search: 0 },
     throttled_millis: 0,
     requests_per_second: -1,
     throttled_until_millis: 0,
     failures: [ [Object], [Object], [Object], [Object] ] },
  statusCode: 400,
  response:
   '{"took":1569,"timed_out":false,"total":8526,"updated":0,"created":996,"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_catalog_1544192036","type":"product","id":"445","cause":{"type":"illegal_argument_exception","reason":"mapper [configurable_children.special_price] of different type, current_type [float], merged_type [text]"},"status":400},{"index":"vue_storefront_catalog_1544192036","type":"product","id":"311","cause":{"type":"illegal_argument_exception","reason":"mapper [configurable_children.special_price] of different type, current_type [float], merged_type [text]"},"status":400},{"index":"vue_storefront_catalog_1544192036","type":"product","id":"524","cause":{"type":"illegal_argument_exception","reason":"mapper [configurable_children.special_price] of different type, current_type [float], merged_type [text]"},"status":400},{"index":"vue_storefront_catalog_1544192036","type":"product","id":"580","cause":{"type":"illegal_argument_exception","reason":"mapper [configurable_children.special_price] of different type, current_type [float], merged_type [text]"},"status":400}]}',
  toString: [Function],
  toJSON: [Function] }
** Removing the original index
Elasticsearch DEBUG: 2018-12-07T14:13:58Z
  starting request {
    "method": "DELETE",
    "path": "/vue_storefront_catalog",
    "query": {}
  }
  

Elasticsearch DEBUG: 2018-12-07T14:13:58Z
  Request complete

{ acknowledged: true }
** Creating alias
Elasticsearch DEBUG: 2018-12-07T14:13:58Z
  starting request {
    "method": "DELETE",
    "path": "/vue_storefront_catalog/_alias/vue_storefront_catalog_1544192036",
    "query": {}
  }
  

Elasticsearch DEBUG: 2018-12-07T14:13:58Z
  Request complete

Public index alias does not exists [index_not_found_exception] no such index, with { resource.type="index_or_alias" & resource.id="vue_storefront_catalog" & index_uuid="_na_" & index="vue_storefront_catalog" }
Elasticsearch DEBUG: 2018-12-07T14:13:58Z
  starting request {
    "method": "PUT",
    "path": "/vue_storefront_catalog_1544192036/_alias/vue_storefront_catalog",
    "query": {}
  }
  

Elasticsearch DEBUG: 2018-12-07T14:13:58Z
  Request complete

Index alias created { acknowledged: true }
Done! Bye!
Done in 2.31s.

from vue-storefront-api.

hunterjamesio avatar hunterjamesio commented on June 15, 2024

I've managed to setup a backup/restore script for ES so I can test this more effectively.

I have updated both Mage2vs and vue-storefront-api, re-run the import (fine!) and then did the rebuild:

** Hello! I am going to rebuild EXISTING ES index to fix the schema
** Creating temporary index vue_storefront_catalog_1544471717
Elasticsearch DEBUG: 2018-12-10T19:55:17Z
  starting request {
    "method": "DELETE",
    "path": "/*/_alias/vue_storefront_catalog_1544471717",
    "query": {}
  }
  

Elasticsearch DEBUG: 2018-12-10T19:55:17Z
  Request complete

Public index alias does not exists [aliases_not_found_exception] aliases [vue_storefront_catalog_1544471717] missing, with { resource.type="aliases" & resource.id="vue_storefront_catalog_1544471717" }
Elasticsearch DEBUG: 2018-12-10T19:55:17Z
  starting request {
    "method": "DELETE",
    "path": "/vue_storefront_catalog_1544471717",
    "query": {}
  }
  

Elasticsearch DEBUG: 2018-12-10T19:55:17Z
  Request complete

Elasticsearch DEBUG: 2018-12-10T19:55:17Z
  starting request {
    "method": "PUT",
    "path": "/vue_storefront_catalog_1544471717",
    "body": {
      "settings": {
        "analysis": {
          "tokenizer": {
            "comma": {
              "type": "pattern",
              "pattern": ","
            }
          },
          "analyzer": {
            "comma": {
              "type": "custom",
              "tokenizer": "comma"
            }
          }
        }
      }
    },
    "query": {}
  }
  

Elasticsearch DEBUG: 2018-12-10T19:55:17Z
  Request complete

{ acknowledged: true,
  shards_acknowledged: true,
  index: 'vue_storefront_catalog_1544471717' }
** Putting the mappings on top of vue_storefront_catalog_1544471717
Elasticsearch DEBUG: 2018-12-10T19:55:17Z
  starting request {
    "method": "PUT",
    "path": "/vue_storefront_catalog_1544471717/_mapping/product",
    "body": {
      "properties": {
        "sku": {
          "type": "keyword"
        },
        "size": {
          "type": "integer"
        },
        "size_options": {
          "type": "integer"
        },
        "price": {
          "type": "float"
        },
        "has_options": {
          "type": "integer"
        },
        "special_price": {
          "type": "float"
        },
        "color": {
          "type": "integer"
        },
        "color_options": {
          "type": "integer"
        },
        "pattern": {
          "type": "text"
        },
        "id": {
          "type": "long"
        },
        "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"
        },
        "special_from_date": {
          "type": "date",
          "format": "yyyy-MM-dd HH:mm:ss||yyyy-MM-dd||epoch_millis"
        },
        "special_to_date": {
          "type": "date",
          "format": "yyyy-MM-dd HH:mm:ss||yyyy-MM-dd||epoch_millis"
        },
        "news_from_date": {
          "type": "date",
          "format": "yyyy-MM-dd HH:mm:ss||yyyy-MM-dd||epoch_millis"
        },
        "news_to_date": {
          "type": "date",
          "format": "yyyy-MM-dd HH:mm:ss||yyyy-MM-dd||epoch_millis"
        },
        "description": {
          "type": "text"
        },
        "name": {
          "type": "text"
        },
        "configurable_children": {
          "properties": {
            "has_options": {
              "type": "boolean"
            },
            "price": {
              "type": "float"
            },
            "sku": {
              "type": "keyword"
            }
          }
        },
        "configurable_options": {
          "properties": {
            "attribute_id": {
              "type": "long"
            },
            "default_label": {
              "type": "text"
            },
            "label": {
              "type": "text"
            },
            "frontend_label": {
              "type": "text"
            },
            "store_label": {
              "type": "text"
            },
            "values": {
              "properties": {
                "default_label": {
                  "type": "text"
                },
                "label": {
                  "type": "text"
                },
                "frontend_label": {
                  "type": "text"
                },
                "store_label": {
                  "type": "text"
                },
                "value_index": {
                  "type": "keyword"
                }
              }
            }
          }
        },
        "category_ids": {
          "type": "long"
        },
        "eco_collection": {
          "type": "integer"
        },
        "eco_collection_options": {
          "type": "integer"
        },
        "erin_recommends": {
          "type": "integer"
        },
        "tax_class_id": {
          "type": "integer"
        },
        "position": {
          "type": "integer"
        },
        "required_options": {
          "type": "integer"
        },
        "Size_options": {
          "type": "keyword"
        },
        "Color_options": {
          "type": "keyword"
        }
      }
    },
    "query": {}
  }
  

Elasticsearch DEBUG: 2018-12-10T19:55:17Z
  Request complete

{ acknowledged: true }
Elasticsearch DEBUG: 2018-12-10T19:55:17Z
  starting request {
    "method": "PUT",
    "path": "/vue_storefront_catalog_1544471717/_mapping/taxrule",
    "body": {
      "properties": {
        "id": {
          "type": "long"
        },
        "rates": {
          "properties": {
            "rate": {
              "type": "float"
            }
          }
        }
      }
    },
    "query": {}
  }
  

Elasticsearch DEBUG: 2018-12-10T19:55:17Z
  Request complete

{ acknowledged: true }
Elasticsearch DEBUG: 2018-12-10T19:55:17Z
  starting request {
    "method": "PUT",
    "path": "/vue_storefront_catalog_1544471717/_mapping/attribute",
    "body": {
      "properties": {
        "id": {
          "type": "long"
        },
        "attribute_id": {
          "type": "long"
        },
        "options": {
          "properties": {
            "value": {
              "type": "text",
              "index": "not_analyzed"
            }
          }
        }
      }
    },
    "query": {}
  }
  

Elasticsearch DEBUG: 2018-12-10T19:55:17Z
  Request complete

{ acknowledged: true }
Elasticsearch DEBUG: 2018-12-10T19:55:17Z
  starting request {
    "method": "PUT",
    "path": "/vue_storefront_catalog_1544471717/_mapping/cms_page",
    "body": {
      "properties": {
        "id": {
          "type": "long"
        },
        "identifier": {
          "type": "keyword"
        },
        "creation_time": {
          "type": "date",
          "format": "yyyy-MM-dd HH:mm:ss||yyyy-MM-dd||epoch_millis"
        },
        "update_time": {
          "type": "date",
          "format": "yyyy-MM-dd HH:mm:ss||yyyy-MM-dd||epoch_millis"
        }
      }
    },
    "query": {}
  }
  

Elasticsearch DEBUG: 2018-12-10T19:55:17Z
  Request complete

{ acknowledged: true }
Elasticsearch DEBUG: 2018-12-10T19:55:17Z
  starting request {
    "method": "PUT",
    "path": "/vue_storefront_catalog_1544471717/_mapping/cms_block",
    "body": {
      "properties": {
        "id": {
          "type": "long"
        },
        "identifier": {
          "type": "keyword"
        },
        "creation_time": {
          "type": "date",
          "format": "yyyy-MM-dd HH:mm:ss||yyyy-MM-dd||epoch_millis"
        },
        "update_time": {
          "type": "date",
          "format": "yyyy-MM-dd HH:mm:ss||yyyy-MM-dd||epoch_millis"
        }
      }
    },
    "query": {}
  }
  

Elasticsearch DEBUG: 2018-12-10T19:55:17Z
  Request complete

{ acknowledged: true }
** We will reindex vue_storefront_catalog with the current schema
Elasticsearch DEBUG: 2018-12-10T19:55:17Z
  starting request {
    "method": "POST",
    "path": "/_reindex",
    "body": {
      "source": {
        "index": "vue_storefront_catalog"
      },
      "dest": {
        "index": "vue_storefront_catalog_1544471717"
      }
    },
    "query": {}
  }
  

Elasticsearch DEBUG: 2018-12-10T19:55:21Z
  Request complete

{ Error: Bad Request
    at respond (/home/fylo/node_modules/elasticsearch/src/lib/transport.js:308:15)
    at checkRespForFailure (/home/fylo/node_modules/elasticsearch/src/lib/transport.js:267:7)
    at HttpConnector.<anonymous> (/home/fylo/node_modules/elasticsearch/src/lib/connectors/http.js:165:7)
    at IncomingMessage.wrapper (/home/fylo/node_modules/lodash/lodash.js:4935:19)
    at IncomingMessage.emit (events.js:187:15)
    at endReadableNT (_stream_readable.js:1092:12)
    at process._tickCallback (internal/process/next_tick.js:63:19)
  status: 400,
  displayName: 'BadRequest',
  message: 'Bad Request',
  path: '/_reindex',
  query: {},
  body:
   { took: 3762,
     timed_out: false,
     total: 58182,
     updated: 0,
     created: 994,
     deleted: 0,
     batches: 1,
     version_conflicts: 0,
     noops: 0,
     retries: { bulk: 0, search: 0 },
     throttled_millis: 0,
     requests_per_second: -1,
     throttled_until_millis: 0,
     failures:
      [ [Object], [Object], [Object], [Object], [Object], [Object] ] },
  statusCode: 400,
  response:
   '{"took":3762,"timed_out":false,"total":58182,"updated":0,"created":994,"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_catalog_1544471717","type":"product","id":"188","cause":{"type":"illegal_argument_exception","reason":"mapper [configurable_children.special_price] of different type, current_type [float], merged_type [text]"},"status":400},{"index":"vue_storefront_catalog_1544471717","type":"product","id":"222","cause":{"type":"illegal_argument_exception","reason":"mapper [configurable_children.special_price] of different type, current_type [float], merged_type [text]"},"status":400},{"index":"vue_storefront_catalog_1544471717","type":"product","id":"311","cause":{"type":"illegal_argument_exception","reason":"mapper [configurable_children.special_price] of different type, current_type [float], merged_type [text]"},"status":400},{"index":"vue_storefront_catalog_1544471717","type":"product","id":"445","cause":{"type":"illegal_argument_exception","reason":"mapper [configurable_children.special_price] of different type, current_type [float], merged_type [text]"},"status":400},{"index":"vue_storefront_catalog_1544471717","type":"product","id":"524","cause":{"type":"illegal_argument_exception","reason":"mapper [configurable_children.special_price] of different type, current_type [float], merged_type [text]"},"status":400},{"index":"vue_storefront_catalog_1544471717","type":"product","id":"580","cause":{"type":"illegal_argument_exception","reason":"mapper [configurable_children.special_price] of different type, current_type [float], merged_type [text]"},"status":400}]}',
  toString: [Function],
  toJSON: [Function] }
{ Error: Bad Request
    at respond (/home/fylo/node_modules/elasticsearch/src/lib/transport.js:308:15)
    at checkRespForFailure (/home/fylo/node_modules/elasticsearch/src/lib/transport.js:267:7)
    at HttpConnector.<anonymous> (/home/fylo/node_modules/elasticsearch/src/lib/connectors/http.js:165:7)
    at IncomingMessage.wrapper (/home/fylo/node_modules/lodash/lodash.js:4935:19)
    at IncomingMessage.emit (events.js:187:15)
    at endReadableNT (_stream_readable.js:1092:12)
    at process._tickCallback (internal/process/next_tick.js:63:19)
  status: 400,
  displayName: 'BadRequest',
  message: 'Bad Request',
  path: '/_reindex',
  query: {},
  body:
   { took: 3762,
     timed_out: false,
     total: 58182,
     updated: 0,
     created: 994,
     deleted: 0,
     batches: 1,
     version_conflicts: 0,
     noops: 0,
     retries: { bulk: 0, search: 0 },
     throttled_millis: 0,
     requests_per_second: -1,
     throttled_until_millis: 0,
     failures:
      [ [Object], [Object], [Object], [Object], [Object], [Object] ] },
  statusCode: 400,
  response:
   '{"took":3762,"timed_out":false,"total":58182,"updated":0,"created":994,"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_catalog_1544471717","type":"product","id":"188","cause":{"type":"illegal_argument_exception","reason":"mapper [configurable_children.special_price] of different type, current_type [float], merged_type [text]"},"status":400},{"index":"vue_storefront_catalog_1544471717","type":"product","id":"222","cause":{"type":"illegal_argument_exception","reason":"mapper [configurable_children.special_price] of different type, current_type [float], merged_type [text]"},"status":400},{"index":"vue_storefront_catalog_1544471717","type":"product","id":"311","cause":{"type":"illegal_argument_exception","reason":"mapper [configurable_children.special_price] of different type, current_type [float], merged_type [text]"},"status":400},{"index":"vue_storefront_catalog_1544471717","type":"product","id":"445","cause":{"type":"illegal_argument_exception","reason":"mapper [configurable_children.special_price] of different type, current_type [float], merged_type [text]"},"status":400},{"index":"vue_storefront_catalog_1544471717","type":"product","id":"524","cause":{"type":"illegal_argument_exception","reason":"mapper [configurable_children.special_price] of different type, current_type [float], merged_type [text]"},"status":400},{"index":"vue_storefront_catalog_1544471717","type":"product","id":"580","cause":{"type":"illegal_argument_exception","reason":"mapper [configurable_children.special_price] of different type, current_type [float], merged_type [text]"},"status":400}]}',
  toString: [Function],
  toJSON: [Function] }
** Removing the original index
Elasticsearch DEBUG: 2018-12-10T19:55:21Z
  starting request {
    "method": "DELETE",
    "path": "/vue_storefront_catalog",
    "query": {}
  }
  

Elasticsearch DEBUG: 2018-12-10T19:55:21Z
  Request complete

{ acknowledged: true }
** Creating alias
Elasticsearch DEBUG: 2018-12-10T19:55:21Z
  starting request {
    "method": "DELETE",
    "path": "/vue_storefront_catalog/_alias/vue_storefront_catalog_1544471717",
    "query": {}
  }
  

Elasticsearch DEBUG: 2018-12-10T19:55:21Z
  Request complete

Public index alias does not exists [index_not_found_exception] no such index, with { resource.type="index_or_alias" & resource.id="vue_storefront_catalog" & index_uuid="_na_" & index="vue_storefront_catalog" }
Elasticsearch DEBUG: 2018-12-10T19:55:21Z
  starting request {
    "method": "PUT",
    "path": "/vue_storefront_catalog_1544471717/_alias/vue_storefront_catalog",
    "query": {}
  }
  

Elasticsearch DEBUG: 2018-12-10T19:55:21Z
  Request complete

Index alias created { acknowledged: true }
Done! Bye!

from vue-storefront-api.

pkarw avatar pkarw commented on June 15, 2024

Please use the vue-storefront-api/config/*.schema.json files to adjust the mappings - it seems like in Your case You should add mapping for configurable_children.special_price explicitly to float

from vue-storefront-api.

pkarw avatar pkarw commented on June 15, 2024

@hunterjamesio any update on that?

from vue-storefront-api.

hunterjamesio avatar hunterjamesio commented on June 15, 2024

Not quite yet sorry I ran out of time today, it's next on my list!

from vue-storefront-api.

pkarw avatar pkarw commented on June 15, 2024

Cool! Happy New Year :-)

from vue-storefront-api.

hunterjamesio avatar hunterjamesio commented on June 15, 2024

Hey @pkarw,

Happy new year :)

Unfortunately I now get the following:

{
   "error":{
      "root_cause":[
         {
            "type":"mapper_parsing_exception",
            "reason":"Mapping definition for [configurable_children] has unsupported parameters:  [special_price : {type=float}]"
         }
      ],
      "type":"mapper_parsing_exception",
      "reason":"Mapping definition for [configurable_children] has unsupported parameters:  [special_price : {type=float}]"
   },
   "status":400
}

I placed the following into config/elastic.schema.product.extension.json:

{
   "properties": {
       "position": {"type": "integer"},
       "tax_class_id": {"type": "integer"},
       "required_options": {"type": "integer"},
       "has_options": {"type": "integer"} ,
       "Size_options": {"type": "keyword"},
       "Color_options": {"type": "keyword"},
       "configurable_children": {
           "special_price": {"type": "float"}
       }
    }
}

Thanks again for all the help and a great platform, super excited to get this project live.

from vue-storefront-api.

hunterjamesio avatar hunterjamesio commented on June 15, 2024

Hey @pkarw,

Looking at the default config I could see I was missing "properties": { around special_price.

All works great now! Thanks so much.

For reference, the below was the solution:

{
   "properties": {
       "position": {"type": "integer"},
       "tax_class_id": {"type": "integer"},
       "required_options": {"type": "integer"},
       "has_options": {"type": "integer"} ,
       "Size_options": {"type": "keyword"},
       "Color_options": {"type": "keyword"},
       "configurable_children": {
           "properties": {
              "special_price": {"type": "float"}
           }
       }
    }
}

from vue-storefront-api.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.