You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
getSourceAsString() on the corresponding GetResponse object returns this successfully when I inserted the document using XContentFactory.jsonBuilder(), but when I inserted the document using XContentFactory.smileBuilder(), I got:
java.lang.ArrayIndexOutOfBoundsException: 87
at org.elasticsearch.common.Unicode.UTF8toUTF16(Unicode.java:190)
at org.elasticsearch.common.Unicode.unsafeFromBytesAsUtf16(Unicode.java:106)
at org.elasticsearch.common.Unicode.fromBytes(Unicode.java:80)
at org.elasticsearch.index.get.GetResult.sourceAsString(GetResult.java:203)
at org.elasticsearch.action.get.GetResponse.sourceAsString(GetResponse.java:150)
...
Will attach a demonstration case when I have a chance.
The text was updated successfully, but these errors were encountered:
Yea, that will happen..., wondering what should be done here, obviously, smile can't be converted to string, maybe we should do auto conversion to json and then return it as string?
Aaah okay. Won't need a demo case if it's known behaviour :-)
Auto conversion would work (if it's not super heavyweight?), but even some sort of NotSupportedException that told you you couldn't do this with SMILE docs would be useful.
In a unit test, I have a document containing one field "val" which is a list of floats:
{ Float.MIN_VALUE, Float.MIN_VALUE - 1, Float.MAX_VALUE, -Float.MIN_VALUE }
The JSON representation of this is:
{"val":[1.4E-45,-1.0,3.4028235E38,-1.4E-45]}
getSourceAsString() on the corresponding GetResponse object returns this successfully when I inserted the document using XContentFactory.jsonBuilder(), but when I inserted the document using XContentFactory.smileBuilder(), I got:
java.lang.ArrayIndexOutOfBoundsException: 87
at org.elasticsearch.common.Unicode.UTF8toUTF16(Unicode.java:190)
at org.elasticsearch.common.Unicode.unsafeFromBytesAsUtf16(Unicode.java:106)
at org.elasticsearch.common.Unicode.fromBytes(Unicode.java:80)
at org.elasticsearch.index.get.GetResult.sourceAsString(GetResult.java:203)
at org.elasticsearch.action.get.GetResponse.sourceAsString(GetResponse.java:150)
...
Will attach a demonstration case when I have a chance.
The text was updated successfully, but these errors were encountered: