The motivation is simple - we have some simple enums like status, commands
etc which we want to index as a single byte rather than a string. In this
example, the mapping looks correct as a byte, but when the object is
indexed, it retrieves as a string in the _source object. Example below
The motivation is simple - we have some simple enums like status, commands
etc which we want to index as a single byte rather than a string. In this
example, the mapping looks correct as a byte, but when the object is
indexed, it retrieves as a string in the _source object. Example below
I directly use the Java API and pass in a Map of string/object. I pretty
much guessed that it was default behaviour of Jackson to serialize Byte as
a string. So may be we will need to serialize it before setting the source?
Btw if we use smile format on contentbuilder does anymore serailization
takes place? Sorry I will explain in detail - we currently receive the
objects as a byte serialized by msgpack protocol (language independent
clients c# or python) which is deserialized into a map and set as source on
index object. This causes 2 translations one from msgpack to map and from
map to json; the reason we used map was to avoid too much char generation
when the underlying data is predominantly numeric. We were wondering that
if we just did one translation from msgpack to smile (json binary)
directly, we can control the types more strongly. However will that give us
any advantage in terms of indexing time etc?
Thanks again
Shankar
On Friday, 22 November 2013, Ivan Brusic wrote:
How are you indexing the enum? Sometimes a different
overloaded XContentBuilder.field() method can be called.
--
Ivan
On Fri, Nov 22, 2013 at 10:51 AM, Shankar Vasudevan < vasudevan.shankar@gmail.com <javascript:_e({}, 'cvml',
'vasudevan.shankar@gmail.com');>> wrote:
The motivation is simple - we have some simple enums like status,
commands etc which we want to index as a single byte rather than a string.
In this example, the mapping looks correct as a byte, but when the object
is indexed, it retrieves as a string in the _source object. Example below
--
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 <javascript:_e({},
'cvml', 'elasticsearch%2Bunsubscribe@googlegroups.com');>.
For more options, visit https://groups.google.com/groups/opt_out.
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.