Can't create an index when fields are with dots and names are similar

Hi team,
I'm facing the below error while creating an index (Elastic 6.0.2). My two properties names are quite similar (one contains the other) and both contains dots. Looks like Elastic is doing some kind of splitting by a dot and trying to merge those two object, and that's failing.

{
"error": {
"root_cause": [
{
"type": "mapper_parsing_exception",
"reason": "Failed to parse mapping [percolatorquery]: Can't merge a non object mapping [sales from u.s] with an object mapping [sales from u.s]"
}
],
"type": "mapper_parsing_exception",
"reason": "Failed to parse mapping [percolatorquery]: Can't merge a non object mapping [sales from u.s] with an object mapping [sales from u.s]",
"caused_by": {
"type": "illegal_argument_exception",
"reason": "Can't merge a non object mapping [sales from u.s] with an object mapping [sales from u.s]"
}
},
"status": 400
}

The actual fields name are: 'sales from u.s. 2019' and 'sales from u.s.' while exception is pointing to 'sales from u.s' (without an end dot)

This is a part of my configuration:

"mappings": {
	"percolatorquery": {
	  "properties": {
		"sales from u.s. 2019": {
		  "type": "float",
		  "store": true,
		  "fields": {
			"sort": {
			  "type": "float"
			}
		  }
		},
		"sales from u.s.": {
		  "type": "text",
		  "store": true,
		  "fields": {
			"raw": {
			  "type": "keyword"
			},
			"text": {
			  "type": "text",
			  "store": true,
			  "analyzer": "Snowball",
			  "search_analyzer": "Snowball",
			  "norms": true,
			  "term_vector": "no"
			},
			"sort": {
			  "type": "keyword",
			  "normalizer": "sortStandard"
			}
		  },
		  "copy_to": []
		}
	  }

Please advise on that.
Thank you

Yes, fields are arranged in a hierarchy and dots are used as the separator. It's best not to use dots for other purposes in your field names.

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