Incorrect field in mapping exception while indexing a document


(Shashank Moengage) #1

We are trying to index a document:
{u'App ID': u'53fca404af36ab0e4c966503',
u'App Name': u'Test',
'Signed Up Date': 'Tue Aug 26 2014 20:43:08 GMT+0530 (IST)',
u'_id': '5661506c6905a8404581a775',
u'cr_t': datetime.datetime(2015, 12, 4, 8, 35, 56, 772000),
u'uid': u'53fca404af36ab0e4c966503'}

In the index Mapping:
"Signed Up Date" is of type long

The value which we are trying to index is not a long:
"Tue Aug 26 2014 20:43:08 GMT+0530 (IST)"

The problem is the exception which I am getting is:
TransportError(400, u'RemoteTransportException[[user-node3][inet[/172.31.33.23:9300]][indices:data/write/index]]; nested: MapperParsingException[failed to parse [moe_geo_ip_lnglat.Signed Up Date]]; nested: NumberFormatException[For input string: "Tue Aug 26 2014 20:43:08 GMT+0530 (IST)"]; ')

The field name in the exception comes as -
moe_geo_ip_lnglat.Signed Up Date.

"moe_geo_ip_lnglat" and "Signed Up Date" are two separate fields in the index.

The Exception should only contain "Signed Up Date" as the field name it failed to parse.

Further Information:
moe_geo_ip_lnglat is a geo_point field which is mapped as a geo_point using template.

Also we also tried the same indexing in another Elasticsearch cluster which doesn't have any such template and it works fine.

Also this incorrect field name exception is also happening with other fields as well with moe_geo_ip_lnglat coming as the parent field.


(David Pilato) #2

Your mapping is incorrect probably.

It's hard to say more without the mapping. Also, could you format your examples as JSON docs? It's hard to understand here.


(system) #3