Created
November 21, 2013 23:07
-
-
Save hindman/7591513 to your computer and use it in GitHub Desktop.
ElasticSearch error: URLs with ?fields parameter: No matching token for number_type BIG_INTEGER
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment