I know that elastic search provides good support for nested json. It has very good support for nested objects with advance indexing.
So, when I make a nested query in elastic search, can the query result be obtained in original nested form ? Or is the query result in flattened form like that in lucene or solr ?
Note: I have used apache solr and lucene before. And, I am evaluating other different search platforms for better support for nested json objects.
I'm giving you a simple example of results maintaining the depth.
PUT people { "mappings": { "list": { "properties": { "name": { "type": "nested" } } } } }
PUT people/list/1 { "age" : "19", "name" : [ { "first" : "John", "last" : "Smith" } ] }
PUT people/list/2 { "age" : "23", "name" : [ { "first" : "Wilber", "last" : "Smith" } ] }
GET people/list/_search { "query": { "match_all": {} } }
As far as I understand, you'll prefer nested mapping to object mapping. Because object would flatten results. See this for reference: https://www.elastic.co/guide/en/elasticsearch/reference/2.4/nested.html