Hi,
I have a java object which has a few primitive properties and a few
references to othe types from my model. (example gisthttps://gist.github.com/1675319
)
I'm using jackson to serialize/deserialize this object from ES (it's the
only one that goes in as a type).
The only properties I want from the referenced types is their "name"
property.
What I was able to do pretty easily in jackson (using @JsonFilter) is to
have jackson output something along these lines:
{ "name" : "testName" , "docProperty" : { "name" : "nameOfProperty" } , "multiDocProperties":[
{"name" : "nameOfProperty2"} , {"name" : "nameOfProperty"} ] , "otherProperty"
: "someValue" }
What I want to know is if there's a difference, with respect to ES
performance, between the above representation and somehow customizing
jackson to output the names as values i.e.:
{ "name" : "testName" , "docProperty" : "nameOfProperty" , "multiDocProperties":[ "nameOfProperty2"
, "nameOfProperty" ] , "otherProperty" : "someValue" }
There isn't a difference between most of what you specified for the overhead of indexing, except for the size of the json (the first option is more verbose).
On Wednesday, January 25, 2012 at 10:18 AM, Ittai Zeidman wrote:
Hi,
I have a java object which has a few primitive properties and a few references to othe types from my model. (example gist (Example of the model for elasticsearch nested objects question (removed getters setters for clarity) · GitHub))
I'm using jackson to serialize/deserialize this object from ES (it's the only one that goes in as a type).
The only properties I want from the referenced types is their "name" property.
What I was able to do pretty easily in jackson (using @JsonFilter) is to have jackson output something along these lines:
{ "name" : "testName" , "docProperty" : { "name" : "nameOfProperty" } , "multiDocProperties":[ {"name" : "nameOfProperty2"} , {"name" : "nameOfProperty"} ] , "otherProperty" : "someValue" }
What I want to know is if there's a difference, with respect to ES performance, between the above representation and somehow customizing jackson to output the names as values i.e.:
{ "name" : "testName" , "docProperty" : "nameOfProperty" , "multiDocProperties":[ "nameOfProperty2" , "nameOfProperty" ] , "otherProperty" : "someValue" }
There isn't a difference between most of what you specified for the overhead of indexing, except for the size of the json (the first option is more verbose).
On Wednesday, January 25, 2012 at 10:18 AM, Ittai Zeidman wrote:
Hi,
I have a java object which has a few primitive properties and a few references to othe types from my model. (example gist)
I'm using jackson to serialize/deserialize this object from ES (it's the only one that goes in as a type).
The only properties I want from the referenced types is their "name" property.
What I was able to do pretty easily in jackson (using @JsonFilter) is to have jackson output something along these lines:
{ "name" : "testName" , "docProperty" : { "name" : "nameOfProperty" } , "multiDocProperties":[ {"name" : "nameOfProperty2"} , {"name" : "nameOfProperty"} ] , "otherProperty" : "someValue" }
What I want to know is if there's a difference, with respect to ES performance, between the above representation and somehow customizing jackson to output the names as values i.e.:
{ "name" : "testName" , "docProperty" : "nameOfProperty" , "multiDocProperties":[ "nameOfProperty2" , "nameOfProperty" ] , "otherProperty" : "someValue" }
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.