需要帮助修复从5.6到7.10的ESMap
下面是一个示例结构。尝试了多种方法,但似乎不起作用,需要帮助。
"_parent": {
"type": "brand"
},
"properties": {
"brand": {
"type": "nested",
"include_in_parent": true,
"properties": {
"encrypted_id": {
"type": "keyword",
"store": true
},
"name": {
"type": "text",
"store": true,
"fields": {
"sort": {
"type": "text",
"analyzer": "sort_analyzer",
"fielddata": true
}
},
"analyzer": "stemmer_analyzer"
}
}
}
}
}
字符串
下面是我收到的错误消息
Caused by: org.elasticsearch.index.mapper.MapperParsingException: Root mapping definition has unsupported parameters: [product : {properties={brand={include_in_parent=true, type=nested, properties={encrypted_id={store=true, type=keyword}, name={analyzer=stemmer_analyzer, store=true, type=text, fields={sort={fielddata=true, analyzer=sort_analyzer, type=text}}}}}}}] [company_profile : {properties={modified_ts={format=dateOptionalTime, store=true, ignore_malformed=true, type=date}, company_type={store=true, type=keyword}, country={store=true, type=keyword}, facebook_url={store=true, type=keyword}, account_type={store=true, type=keyword}, featured={include_in_parent=true, type=nested, properties={display_order={store=true, type=long}, event_encrypted_id={store=true, type=keyword}, is_featured={store=true, type=boolean}}}, created_dt={format=dateOptionalTime, store=true, ignore_malformed=true, type=date}, encrypted_id={store=true, type=keyword}, custom_fields={include_in_parent=true, type=nested, properties={buyer_50_fields={type=text, fields={keyword={ignore_above=256, type=keyword}}},
型
更新日期:
PUT /test_0001
{
"mappings": {
"properties": {
"brand": {
"properties": {
"encrypted_id": {
"type": "keyword"
},
"name": {
"type": "text",
"fields": {
"sort": {
"type": "keyword"
}
}
}
}
}
}
}
}
型
错误:下面是我收到的错误消息
{
"error": {
"root_cause": [
{
"type": "mapper_parsing_exception",
"reason": "Root mapping definition has unsupported parameters: [brand : {properties={encrypted_id={type=keyword}, name={type=text, fields={sort={type=keyword}}}}}]"
}
],
"type": "mapper_parsing_exception",
"reason": "Failed to parse mapping [properties]: Root mapping definition has unsupported parameters: [brand : {properties={encrypted_id={type=keyword}, name={type=text, fields={sort={type=keyword}}}}}]",
"caused_by": {
"type": "mapper_parsing_exception",
"reason": "Root mapping definition has unsupported parameters: [brand : {properties={encrypted_id={type=keyword}, name={type=text, fields={sort={type=keyword}}}}}]"
}
},
"status": 400
}
型
Map代码是ES 5.6,我们使用的最新代码是7.10
即使修复后得到同样的错误
Failed to parse mapping [_doc]: Root mapping definition has unsupported parameters: [product : {properties={min_msrp={type=double}, is_immediate={type=boolean}, price_visibility_level={type=keyword}, is_published={type=boolean}, display_order={type=long}, description={type=text}, locale={type=keyword}, max_msrp={type=double}, product_images={type=nested, properties={encrypted_id={type=keyword}, name={type=text, fields={sort={type=text}}}}}, msrp_price={type=double}, premium={type=nested, properties={is_premium={type=boolean}, display_order={type=long}}}, company_profile={type=nested, properties={account_type={type=keyword}, encrypted_id={type=keyword}, name={type=text, fields={sort={type=text}}}}}, has_default_sku={type=text}, most_viewed_count={type=long}, price={type=double}, immediate_display_order={type=long}, visibility_level={type=keyword}, company={type=nested, properties={external_checkout_commerce={type=boolean}, allowed_buyer={type=text}, is_connection_requirement_turned_off={type=boolean}, encrypted_id={type=keyword}, subscription_type={type=keyword}, payment_ready={type=boolean}}}, currency={type=keyword}, tag={type=nested, properties={name={type=text, fields={sort={type=text}}}}}, sku={type=text}, stock={type=long}, trackInventory={type=long}, brand={type=nested, properties={encrypted_id={type=keyword}, name={type=text, fields={sort={type=text}}}}}, group={type=nested, properties={cancel_end={format=date_optional_time, type=date}, image={type=nested, properties={encrypted_id={type=keyword}}}, cancel_end_display={format=date_optional_time, type=date}, launch_start={format=date_optional_time, type=date}, encrypted_id={type=keyword}, is_published={type=boolean}, order_end={format=date_optional_time, type=date}, display_order={type=long}, description={type=text}, launch_end_display={format=date_optional_time, type=date}, is_public={type=boolean}, name={type=text, fields={sort={type=text}}}, launch_end={format=date_optional_time, type=date}, delivery_end={format=date_optional_time, type=date}, delivery_start={format=date_optional_time, type=date}, delivery_start_display={format=date_optional_time, type=date}, is_default_product={type=boolean}, order_end_display={format=date_optional_time, type=date}, is_featured={type=boolean}, launch_start_display={format=date_optional_time, type=date}, delivery_end_display={format=date_optional_time, type=date}}}, info={type=nested, properties={definition_id={type=keyword}, display_order={type=long}, id={type=keyword}, label={type=keyword}, type={type=keyword}, value={type=keyword, fields={date={type=date}, number={type=long}, bool={type=boolean}, decimal_number={type=double}, text={type=text}}}, required={type=boolean}}}, company_customfields={type=nested, properties={customfield_id={type=keyword}, customfield_name={type=text}, display_order={type=long}, customfield_value_id={type=keyword}, customfield_value={type=keyword}}}, has_buying_option={type=boolean}, images={type=nested, properties={encrypted_id={type=keyword}, display_order={type=long}, is_default={type=boolean}}}, created_dt={format=date_optional_time, type=date}, encrypted_id={type=keyword}, sku_is_immediate={type=long}, companyprofile_display_order={type=long}, max_price={type=double}, min_price={type=double}, name={type=text, fields={sort={type=text}}}, product_display_order={type=long}, category={type=nested, properties={encrypted_id={type=keyword}, name={type=text, fields={sort={type=text}}}}}, showtoexhibitors={type=keyword}, is_featured={type=boolean},
型
1条答案
按热度按时间uxh89sit1#
从5.6到7.10,mapping types have been removed和它是不可能再创建几个Map类型内7.x索引。
如果你想继续使用你的自定义类型名,你可以在创建索引时指定
include_type_name=true
。它会工作,但你会在服务器日志中得到一个弃用警告。此外,一旦从7.10升级到8.x,包含自定义类型名称将不起作用。因此,您现在可以安全地继续使用这种方式,但您应该删除自定义类型名称,并使用唯一的默认类型名称,即
_doc
。