Problem adding records to index.. which has field type geo_point


(Ravi Chittari) #1

When I try to index an object using Jest client or elastic client, I get this error..

failed to execute [index {[storelocations][wines][PFV-1187GVRNC], source[{"id":"xx1111","active":"Yes","locationName":"y Vineyards","locationType":"Standard","url":"www.xyz.com/","address1":"asdfds asdf Valley Road","address2":"","address3":"","address4":"","city":"Napa","zipPostalCode":"94558","country":"US","internationalAddress":"","contactPhone":"11111111","contactFax":"","facebookPageId":"","pin":{"point":{"lat":38.2975380999999970299541018903255462646484375,"lon":-122.286865000000005920810508541762828826904296875}}}]}] on [[storelocations][0]]
java.lang.IllegalArgumentException: [pin.point] is defined as an object in mapping [wines] but this name is already used for a field in other types

I double, tripple checked that pin.point does not exist anywhere.. I also deleted indexes before executing this.. Please let me know what I am doing wrong..

I have the following mapping
{
"settings":{

	"number_of_shards":5,
	"number_of_replicas":1
},
"mappings": {
	"storelocations": {
		"properties":{
			"id":{"type":"string","index":"not_analyzed"},
			"active":{"type":"string","index":"not_analyzed"},
			"locationName":{"type":"string","index":"not_analyzed"},
			"locationType":{"type":"string","index":"not_analyzed"},
			"url":{"type":"string","index":"not_analyzed"},
			"address1":{"type":"string","index":"not_analyzed"},
			"address2":{"type":"string","index":"not_analyzed"},
			"address3":{"type":"string","index":"not_analyzed"},
			"address4":{"type":"string","index":"not_analyzed"},
			"city":{"type":"string","index":"not_analyzed"},
			"zipPostalCode":{"type":"string","index":"not_analyzed"},
			"country":{"type":"string","index":"not_analyzed"},
			"internationalAddress":{"type":"string","index":"not_analyzed"},
			"contactPhone":{"type":"string","index":"not_analyzed"},
			"contactFax":{"type":"string","index":"not_analyzed"},
			"facebookPageId":{"type":"string","index":"not_analyzed"},
			"pin" : {
				        "properties" : {
				            "point" : {
				                "type" : "geo_point"
				            }
				        }
				    }
		}
	}
}

}


(Mark Walkom) #2

Is that the entire mappings for storelocations?


(system) #3