Mapping Issues

Hey,

I am facing a problem with elastic search mapping. currently, my elastic search version is 1.7.2. When I index my data in a cluster it workes perfectly. But when I want to map it for search purposes it gives me an error. Can you guys help me out to resolve this? My error screenshot is attached.


Thanks.

Welcome!

Please don't post images of text as they are hard to read, may not display correctly for everyone, and are not searchable.

Instead, paste the text and format it with </> icon or pairs of triple backticks (```), and check the preview window to make sure it's properly formatted before posting it. This makes it more likely that your question will receive a useful answer.

It would be great if you could update your post to solve this.

Also please share a full recreation script as described in About the Elasticsearch category. It will help to better understand what you are doing. Please, try to keep the example as simple as possible.

A full reproduction script is something anyone can copy and paste in Kibana dev console, click on the run button to reproduce your use case. It will help readers to understand, reproduce and if needed fix your problem. It will also most likely help to get a faster answer.

Hey,

Thanks, @dadoonet for your kind reply my rearranged question is below. Have a look at it.
I am facing a problem with elastic search mapping. currently, my elastic search version is 1.7.2. When I index my data in a cluster it workes perfectly. But when I want to map it for search purposes it gives me an error. Can you guys help me out to resolve this? You can see my script below.

PUT {
	"index": "mygoto",
	"type": "1",
	"body": {
		"1": {
			"_source": {
				"properties": {
					"enabled": true
				}
			},
			"properties": {
				"featured": {
					"type": "string",
					"index": "not_analyzed"
				},
				"tiny_url": {
					"type": "string",
					"index": "not_analyzed"
				},
				"dealer_id": {
					"type": "string",
					"index": "not_analyzed"
				},
				"price": {
					"type": "integer"
				},
				"display_status": {
					"type": "integer"
				},
				"CreatedDate": {
					"type": "date"
				},
				"ModifiedDate": {
					"type": "date"
				},
				"ADID": {
					"type": "integer"
				},
				"postalcode": {
					"type": "string",
					"index": "not_analyzed"
				},
				"name": {
					"type": "string",
					"index": "analyzed",
					"analyzer": "keyword_lowecase"
				},
				"location": {
					"type": "geo_point",
					"geohash": true,
					"geohash_prefix": true
				},
				"f6": {
					"properties": {
						"name": {
							"type": "string",
							"index": "not_analyzed"
						},
						"value": {
							"type": "string",
							"index": "analyzed",
							"analyzer": "keyword_lowecase"
						}
					}
				},
				"f7": {
					"properties": {
						"name": {
							"type": "string",
							"index": "not_analyzed"
						},
						"value": {
							"type": "string",
							"index": "analyzed",
							"analyzer": "keyword_lowecase"
						}
					}
				},
				"f5": {
					"properties": {
						"name": {
							"type": "string",
							"index": "not_analyzed"
						},
						"value": {
							"type": "string",
							"index": "analyzed",
							"analyzer": "keyword_lowecase"
						}
					}
				},
				"f17": {
					"properties": {
						"name": {
							"type": "string",
							"index": "not_analyzed"
						},
						"value": {
							"type": "string",
							"index": "analyzed",
							"analyzer": "keyword_lowecase"
						}
					}
				},
				"f12": {
					"properties": {
						"name": {
							"type": "string",
							"index": "not_analyzed"
						},
						"value": {
							"type": "string",
							"index": "analyzed",
							"analyzer": "keyword_lowecase"
						}
					}
				},
				"f15": {
					"properties": {
						"name": {
							"type": "string",
							"index": "not_analyzed"
						},
						"value": {
							"type": "string",
							"index": "analyzed",
							"analyzer": "keyword_lowecase"
						}
					}
				},
				"f1": {
					"properties": {
						"name": {
							"type": "string",
							"index": "not_analyzed"
						},
						"value": {
							"type": "string",
							"index": "analyzed",
							"analyzer": "keyword_lowecase"
						}
					}
				},
				"f10": {
					"properties": {
						"name": {
							"type": "string",
							"index": "not_analyzed"
						},
						"value": {
							"type": "string",
							"index": "analyzed",
							"analyzer": "keyword_lowecase"
						}
					}
				},
				"f30": {
					"properties": {
						"name": {
							"type": "string",
							"index": "not_analyzed"
						},
						"value": {
							"type": "string",
							"index": "analyzed",
							"analyzer": "keyword_lowecase"
						}
					}
				}
			}
		}
	}
}

It looks like the analyser name in the mapping might be misspelled as it seems to be missing an r (keyword_lowecase instead of keyword_lowercase). Note that the version you are using has been EOL for many years so I would recommend that you upgrade.

I think that @Christian_Dahlqvist probably spotted the issue.

But let me add few things:

This is a way too old. We are now at 7.10.0. You should really consider switching to a new version.
Specifically if you are creating new indices as per your post, start a new cluster instead for this new use case.

PUT {
   "index": "mygoto",
   "type": "1",
   "body": {
   	"1": {
...

This script can not be pasted as is in Kibana. Next time, please share a script that can be used as is.

New script can you check this
PUT {
"index": "mygoto",
"type": "1",
"body": {
"1": {
"_source": {
"properties": {
"enabled": true
}
},
"properties": {
"featured": {
"type": "string",
"index": "not_analyzed"
},
"tiny_url": {
"type": "string",
"index": "not_analyzed"
},
"dealer_id": {
"type": "string",
"index": "not_analyzed"
},
"price": {
"type": "integer"
},
"display_status": {
"type": "integer"
},
"CreatedDate": {
"type": "date"
},
"ModifiedDate": {
"type": "date"
},
"ADID": {
"type": "integer"
},
"postalcode": {
"type": "string",
"index": "not_analyzed"
},
"name": {
"type": "string",
"index": "analyzed",
"analyzer": "keyword_lowercase"
},
"location": {
"type": "geo_point",
"geohash": true,
"geohash_prefix": true
},
"f6": {
"properties": {
"name": {
"type": "string",
"index": "not_analyzed"
},
"value": {
"type": "string",
"index": "analyzed",
"analyzer": "keyword_lowercase"
}
}
},
"f7": {
"properties": {
"name": {
"type": "string",
"index": "not_analyzed"
},
"value": {
"type": "string",
"index": "analyzed",
"analyzer": "keyword_lowercase"
}
}
},
"f5": {
"properties": {
"name": {
"type": "string",
"index": "not_analyzed"
},
"value": {
"type": "string",
"index": "analyzed",
"analyzer": "keyword_lowercase"
}
}
},
"f17": {
"properties": {
"name": {
"type": "string",
"index": "not_analyzed"
},
"value": {
"type": "string",
"index": "analyzed",
"analyzer": "keyword_lowercase"
}
}
},
"f12": {
"properties": {
"name": {
"type": "string",
"index": "not_analyzed"
},
"value": {
"type": "string",
"index": "analyzed",
"analyzer": "keyword_lowercase"
}
}
},
"f15": {
"properties": {
"name": {
"type": "string",
"index": "not_analyzed"
},
"value": {
"type": "string",
"index": "analyzed",
"analyzer": "keyword_lowercase"
}
}
},
"f1": {
"properties": {
"name": {
"type": "string",
"index": "not_analyzed"
},
"value": {
"type": "string",
"index": "analyzed",
"analyzer": "keyword_lowercase"
}
}
},
"f10": {
"properties": {
"name": {
"type": "string",
"index": "not_analyzed"
},
"value": {
"type": "string",
"index": "analyzed",
"analyzer": "keyword_lowercase"
}
}
},
"f30": {
"properties": {
"name": {
"type": "string",
"index": "not_analyzed"
},
"value": {
"type": "string",
"index": "analyzed",
"analyzer": "keyword_lowercase"
}
}
}
}
}
}
}

I have not used that version in years so can not really check or test anything.

Please format your code, logs or configuration files using </> icon as explained in this guide and not the citation button. It will make your post more readable.

Or use markdown style like:

```
CODE
```

This is the icon to use if you are not using markdown format:

There's a live preview panel for exactly this reasons.

Lots of people read these forums, and many of them will simply skip over a post that is difficult to read, because it's just too large an investment of their time to try and follow a wall of badly formatted text.
If your goal is to get an answer to your questions, it's in your interest to make it as easy to read and understand as possible.
Please update your post.

I think you are missing a blank line between the text and the script. I did edit the previous one, but please fix this one by yourself.

This is the new formatted code.
    
    ```
    CODE
    ```    

    PUT     {
            	"index": "mygoto",
            	"type": "1",
            	"body": {
            		"1": {
            			"_source": {
            				"properties": {
            					"enabled": true
            				}
            			},
            			"properties": {
            				"featured": {
            					"type": "string",
            					"index": "not_analyzed"
            				},
            				"tiny_url": {
            					"type": "string",
            					"index": "not_analyzed"
            				},
            				"dealer_id": {
            					"type": "string",
            					"index": "not_analyzed"
            				},
            				"price": {
            					"type": "integer"
            				},
            				"display_status": {
            					"type": "integer"
            				},
            				"CreatedDate": {
            					"type": "date"
            				},
            				"ModifiedDate": {
            					"type": "date"
            				},
            				"ADID": {
            					"type": "integer"
            				},
            				"postalcode": {
            					"type": "string",
            					"index": "not_analyzed"
            				},
            				"name": {
            					"type": "string",
            					"index": "analyzed",
            					"analyzer": "keyword_lowercase"
            				},
            				"location": {
            					"type": "geo_point",
            					"geohash": true,
            					"geohash_prefix": true
            				},
            				"f6": {
            					"properties": {
            						"name": {
            							"type": "string",
            							"index": "not_analyzed"
            						},
            						"value": {
            							"type": "string",
            							"index": "analyzed",
            							"analyzer": "keyword_lowercase"
            						}
            					}
            				},
            				"f7": {
            					"properties": {
            						"name": {
            							"type": "string",
            							"index": "not_analyzed"
            						},
            						"value": {
            							"type": "string",
            							"index": "analyzed",
            							"analyzer": "keyword_lowercase"
            						}
            					}
            				},
            				"f5": {
            					"properties": {
            						"name": {
            							"type": "string",
            							"index": "not_analyzed"
            						},
            						"value": {
            							"type": "string",
            							"index": "analyzed",
            							"analyzer": "keyword_lowercase"
            						}
            					}
            				},
            				"f17": {
            					"properties": {
            						"name": {
            							"type": "string",
            							"index": "not_analyzed"
            						},
            						"value": {
            							"type": "string",
            							"index": "analyzed",
            							"analyzer": "keyword_lowercase"
            						}
            					}
            				},
            				"f12": {
            					"properties": {
            						"name": {
            							"type": "string",
            							"index": "not_analyzed"
            						},
            						"value": {
            							"type": "string",
            							"index": "analyzed",
            							"analyzer": "keyword_lowercase"
            						}
            					}
            				},
            				"f15": {
            					"properties": {
            						"name": {
            							"type": "string",
            							"index": "not_analyzed"
            						},
            						"value": {
            							"type": "string",
            							"index": "analyzed",
            							"analyzer": "keyword_lowercase"
            						}
            					}
            				},
            				"f1": {
            					"properties": {
            						"name": {
            							"type": "string",
            							"index": "not_analyzed"
            						},
            						"value": {
            							"type": "string",
            							"index": "analyzed",
            							"analyzer": "keyword_lowercase"
            						}
            					}
            				},
            				"f10": {
            					"properties": {
            						"name": {
            							"type": "string",
            							"index": "not_analyzed"
            						},
            						"value": {
            							"type": "string",
            							"index": "analyzed",
            							"analyzer": "keyword_lowercase"
            						}
            					}
            				},
            				"f30": {
            					"properties": {
            						"name": {
            							"type": "string",
            							"index": "not_analyzed"
            						},
            						"value": {
            							"type": "string",
            							"index": "analyzed",
            							"analyzer": "keyword_lowercase"
            						}
            					}
            				}
            			}
            		}
            	}
            }

Don't format the whole content but just the code.

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