My project has documents with very large integers. In order to index those
documents, I have to set their types to string (or double) -- either one
works.
However, I get the following exception whenever a URL includes a "?fields="
parameter.
Here's a simple demonstration (also available as a Gist:
https://gist.github.com/hindman/7591513):
Create index.
curl -X DELETE localhost:9200/xx
curl -X PUT localhost:9200/xx
Set up the mapping to handle very large integer fields.
curl -X PUT localhost:9200/xx/yy/_mapping -d '{"yy": {"properties": {"a":
{"type": "string"}, "b": {"type": "string"}}}}'
Index two documents, the second having very large integers.
curl -X PUT localhost:9200/xx/yy/1 -d '{"a": 123, "b": 456}'
curl -X PUT localhost:9200/xx/yy/2 -d '{"a": 933655199414565157, "b":
9917602859033623819}'
Everything is working so far: I can retrieve the documents.
curl -X GET localhost:9200/xx/yy/1
curl -X GET localhost:9200/xx/yy/2
I can use a ?fields= query parameter with the first document.
curl -X GET localhost:9200/xx/yy/1?fields=a,b
But not with the second.
curl -X GET localhost:9200/xx/yy/2?fields=a,b
{"error":"ElasticSearchIllegalStateException[No matching token for
number_type [BIG_INTEGER]]","status":500}
Here's my version info: 0.90.5, Build: c8714e8/2013-09-17T12:50:20Z, JVM:
1.6.0_65.
Am I doing something incorrectly, or is there a workaround? Thanks.
--
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.
For more options, visit https://groups.google.com/groups/opt_out.