Indexing nested objects


(Dan Everton) #1

Howdy,

I've been reading through the mapping documentation for ES but haven't
really found a good way to index nested structures without the having
indexes created for all possible depths of nesting.

Here's an example document of what I'm talking about https://gist.github.com/1044127

ES indexes this fine, but creates repeated mappings for each level of
nesting like stackTrace.causedBy.causedBy.message which isn't ideal.
What would be nice would be to do queries like
"stackTrace.causedBy.message:FINDTHIS" and have ES search all messages
down that stack trace hierarchy.

Can this be done? Or would it be better to restructure the documents
so instead of nesting the causedBy, it's an array of causedBy?

Cheers,
Dan


(system) #2