Unsupported parameters for multi fields

Hello,

I am new to Elastic.

I am getting the following error while uploading the ES index template.

{"error":{"root_cause":[{"type":"mapper_parsing_exception","reason":"Mapping definition for [path] has unsupported parameters:  
[field : {keyword={ignore_above=256, type=keyword}}]"}],"type":"mapper_parsing_exception","reason":"Failed to parse mapping [_doc]: 
Mapping definition for [path] has unsupported parameters:  [field : {keyword={ignore_above=256, type=keyword}}]","caused_by":
{"type":"mapper_parsing_exception","reason":"Mapping definition for [path] has unsupported parameters: 
 [field : {keyword={ignore_above=256, type=keyword}}]"}},"status":400}

This is my index

{
	"mappings": {
		"_doc": {
			"properties": {
				"offerId": {
					"type": "text",
					"fields": {
						"keyword": {
							"type": "keyword",
							"ignore_above": 256
						}
					}
				},
				"offerDetail": {
                                        "type"= "nested",
					"properties": {
						 "dataStatus" : {
						 	"properties": {
						 		"value": {
						 			"type": "text",
						 			"field": {
						 				"keyword": {
						 					"type": "keyword",
						 					"ignore_above": 256
						 				}
						 			}
						 		},
						 		"content": {
						 			"properties": {
						 				"key": {
						 					"type": "text",
						 					"field": {
						 						"keyword": {
						 							"type": "keyword",
						 							"ignore_above": 256
						 						}
						 					}	
						 				}
						 			}
						 		}
						 	}
				 		},
				 		"images": {
				 			"properties": {
				 				"path": {
				 					"type": "text",
				 					"field": {
				 						"keyword": {
				 							"type": "keyword",
				 							"ignore_above": 256
				 						}
				 					}
				 				},
				 			}
				 		},
				 		"annualPrice": {
				 			"properties": {
				 				"cutPriceExcludingVat": {
				 					"type": "long"
				 				},
								"monthlyExcludingVat": {
									"type": "long"
								},
								"quotationId": {
				 					"type": "text",
				 					"field": {
				 						"keyword": {
				 							"type": "keyword",
				 							"ignore_above": 256
				 						}
				 					}
								}
				 				
				 			}
				 		}
				 	}
				}
			}
		}
	}
}

I get this error for all the attributes that the are multi field (text with field keyword" What I tried to do is to change the type of path to "keyword" and not multiple fields.

					 				"path": {
					 					"type": "keyword"	
					 				}

And that pass. But I need to understand why I can go with the multi fields ??

The issue here is because multi-field should be declared with fields and not field. The definition for property offerId is correct but all the others are wrong.

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