mapping nested type

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

mapping nested type

paul
In the below url they have explained nested types but how to specify type to nested properties

http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/mapping-nested-type.html

Example given
{
   
"obj1" : [
       
{
           
"name" : "blue",
           
"count" : 4
       
},
       
{
           
"name" : "green",
           
"count" : 6
       
}
   
]
}

Mapping given 
{
   
"type1" : {
       
"properties" : {
           
"obj1" : {
               
"type" : "nested"
           
}
       
}
   
}
}

We say type is "nested" But how to map name to string and count to int ??

--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/74530e0c-a651-4145-9119-db4b33aeae7b%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
Reply | Threaded
Open this post in threaded view
|

Re: mapping nested type

paul
found the answer in 
http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/mapping-object-type.html
by using properties

On Wednesday, 27 November 2013 15:22:44 UTC+5:30, paul wrote:
In the below url they have explained nested types but how to specify type to nested properties

<a href="http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/mapping-nested-type.html" target="_blank" onmousedown="this.href='http://www.google.com/url?q\75http%3A%2F%2Fwww.elasticsearch.org%2Fguide%2Fen%2Felasticsearch%2Freference%2Fcurrent%2Fmapping-nested-type.html\46sa\75D\46sntz\0751\46usg\75AFQjCNFNjFeowhXoON_5A0grZYR9apW3Pw';return true;" onclick="this.href='http://www.google.com/url?q\75http%3A%2F%2Fwww.elasticsearch.org%2Fguide%2Fen%2Felasticsearch%2Freference%2Fcurrent%2Fmapping-nested-type.html\46sa\75D\46sntz\0751\46usg\75AFQjCNFNjFeowhXoON_5A0grZYR9apW3Pw';return true;">http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/mapping-nested-type.html

Example given
{
   
"obj1" : [
       
{
           
"name" : "blue",
           
"count" : 4
       
},
       
{
           
"name" : "green",
           
"count" : 6
       
}
   
]
}

Mapping given 
{
   
"type1" : {
       
"properties" : {
           
"obj1" : {
               
"type" : "nested"
           
}
       
}
   
}
}

We say type is "nested" But how to map name to string and count to int ??

--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/e18c492a-cae3-46a3-b2b0-d66acfb5cb30%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.