Hi,
I use the 'mapping' to get my datasources mapping.
transportClient.admin().indices().getMappings(new GetMappingsRequest().
indices("myIndex")).get();
I then use what the mapping says to cast fields in returned documents. For
one of the fields, the mapping says it's a long, but when I cast it I get:
! java.lang.ClassCastException: java.lang.Integer cannot be cast to java.
lang.Long
when using the getSource()
method, which returns a <String, Object> map.
long ts = (long) searchHit.getSource().get("ts");
Is this a bug in ES? It says it's a long, but the underlying Object in the
map value is apparently an Integer!
--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/ec406cd1-2052-4b46-90ff-189267ff9832%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.