Nested objects and impact on performance of queries and filters

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" }

Thanks in advance

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" }

Thanks in advance

Thanks a lot Shay,
Glad that I can avoid that overhead.

ב-25 בינו 2012, בשעה 18:35, Shay Banon kimchy@gmail.com כתב/ה:

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" }

Thanks in advance