Sub types

Does ES support document subtypes? For example, can I do the following action, and still be able to provide/get mappings for subtype1 and subtype2? Or does ES only support a 2-level structure of index followed by type?

curl -XPOST 'localhost:9200:/index/group/subtype1' -d {…}
curl -XPOST 'localhost:9200:/index/group/subtype2' -d {…}

curl -XGET 'localhost:9200:/index/group/subtype1/_mapping'
curl -XGET 'localhost:9200:/index/group/subtype2/_mapping'

--
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 elasticsearch+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Hey,

you always can specify exactly one type for your data being indexed (in the
URL). I am not sure what your actual use-case is, but you might want to
read about nested documents and parent child relations.
http://www.elasticsearch.org/guide/reference/mapping/nested-type.html
http://www.spacevatican.org/2012/6/3/fun-with-elasticsearch-s-children-and-nested-documents/

--Alex

On Tue, Mar 12, 2013 at 7:14 PM, vinh vinh@loggly.com wrote:

Does ES support document subtypes? For example, can I do the following
action, and still be able to provide/get mappings for subtype1 and
subtype2? Or does ES only support a 2-level structure of index followed by
type?

curl -XPOST 'localhost:9200:/index/group/subtype1' -d {…}
curl -XPOST 'localhost:9200:/index/group/subtype2' -d {…}

curl -XGET 'localhost:9200:/index/group/subtype1/_mapping'
curl -XGET 'localhost:9200:/index/group/subtype2/_mapping'

--
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 elasticsearch+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

--
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 elasticsearch+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Thanks Alex!

On Mar 13, 2013, at 12:24 AM, Alexander Reelsen alr@spinscale.de wrote:

Hey,

you always can specify exactly one type for your data being indexed (in the URL). I am not sure what your actual use-case is, but you might want to read about nested documents and parent child relations.
http://www.elasticsearch.org/guide/reference/mapping/nested-type.html
http://www.spacevatican.org/2012/6/3/fun-with-elasticsearch-s-children-and-nested-documents/

--Alex

On Tue, Mar 12, 2013 at 7:14 PM, vinh vinh@loggly.com wrote:
Does ES support document subtypes? For example, can I do the following action, and still be able to provide/get mappings for subtype1 and subtype2? Or does ES only support a 2-level structure of index followed by type?

curl -XPOST 'localhost:9200:/index/group/subtype1' -d {…}
curl -XPOST 'localhost:9200:/index/group/subtype2' -d {…}

curl -XGET 'localhost:9200:/index/group/subtype1/_mapping'
curl -XGET 'localhost:9200:/index/group/subtype2/_mapping'

--
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 elasticsearch+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

--
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 elasticsearch+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

--
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 elasticsearch+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.