nested document

classic Classic list List threaded Threaded
1 message Options
nmz
Reply | Threaded
Open this post in threaded view
|

nested document

nmz
Hi,

I try to create 'test' document as follows

{
    "test": {
        "properties": {
            "nested_docs": {
                "properties": {
                         "user_id": { "type": "string", "index":
"not_analyzed" },
                           "user_name" :{................}
                            "created_time": { "type": "date"   }
                        }
                    }
                 } } }


I have a field 'nested_docs' [multi-valued] which has two fields
[user_id, created_time].

Will this document mapping automatically be nested type, or do I have
to specify "type": "nested" ?

Also i would like to know about the advantage of using nested
documents.