How to see all document types for a give index?

Thanks,

--
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.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/2097260f-9157-4de3-aedf-5713027d88ef%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Great question. I do not think there is an API to get that data (someone
please correct me if I am wrong), but since the type is basically just
another field inside the Lucene document, you can also run a
aggregation/facet on the implicit field called _type:

{
"size": 0,
"query": {"match_all": {}},
"aggs" : {
"types" : {
"terms" : { "field" : "_type" }
}
}
}

Cheers,

Ivan

On Sun, Jun 29, 2014 at 9:40 AM, Jinyuan Zhou zhou.jinyuan@gmail.com
wrote:

Thanks,

--
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.
To view this discussion on the web visit
https://groups.google.com/d/msgid/elasticsearch/2097260f-9157-4de3-aedf-5713027d88ef%40googlegroups.com
https://groups.google.com/d/msgid/elasticsearch/2097260f-9157-4de3-aedf-5713027d88ef%40googlegroups.com?utm_medium=email&utm_source=footer
.
For more options, visit https://groups.google.com/d/optout.

--
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.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/CALY%3DcQBvxuxkia1wXGpZNNME4_yycZjBX_Enae1u-3yEfV3MTA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

I believe http://localhost:9200/index/_mapping will give you types.

It is an indirect method for sure, but that kind of metadata is going to be in memory and not require fielddata cache.

--
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.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/75b3cb8c-5c22-48e5-88d3-d7f64377ca94%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Thanks, I guess this may be the perfect solution.

Jinyuan (Jack) Zhou

On Tue, Jul 1, 2014 at 6:23 AM, smonasco smonasco@gmail.com wrote:

I believe http://localhost:9200/index/_mapping will give you types.

It is an indirect method for sure, but that kind of metadata is going to
be in memory and not require fielddata cache.

--
You received this message because you are subscribed to a topic in the
Google Groups "elasticsearch" group.
To unsubscribe from this topic, visit
https://groups.google.com/d/topic/elasticsearch/j4z7FNOScEI/unsubscribe.
To unsubscribe from this group and all its topics, send an email to
elasticsearch+unsubscribe@googlegroups.com.
To view this discussion on the web visit
https://groups.google.com/d/msgid/elasticsearch/75b3cb8c-5c22-48e5-88d3-d7f64377ca94%40googlegroups.com
.
For more options, visit https://groups.google.com/d/optout.

--
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.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/CANBTPCGRR63bQ3QcUaJ7yNU2h7wDDGaCEg5ODrSMM8xZiu9ZdA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

I knew there had to be a simpler solution! Missed the extremely obvious.

--
Ivan

On Tue, Jul 1, 2014 at 9:58 AM, Jinyuan Zhou zhou.jinyuan@gmail.com wrote:

Thanks, I guess this may be the perfect solution.

Jinyuan (Jack) Zhou

On Tue, Jul 1, 2014 at 6:23 AM, smonasco smonasco@gmail.com wrote:

I believe http://localhost:9200/index/_mapping will give you types.

It is an indirect method for sure, but that kind of metadata is going to
be in memory and not require fielddata cache.

--
You received this message because you are subscribed to a topic in the
Google Groups "elasticsearch" group.
To unsubscribe from this topic, visit
https://groups.google.com/d/topic/elasticsearch/j4z7FNOScEI/unsubscribe.
To unsubscribe from this group and all its topics, send an email to
elasticsearch+unsubscribe@googlegroups.com.
To view this discussion on the web visit
https://groups.google.com/d/msgid/elasticsearch/75b3cb8c-5c22-48e5-88d3-d7f64377ca94%40googlegroups.com
.
For more options, visit https://groups.google.com/d/optout.

--
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.
To view this discussion on the web visit
https://groups.google.com/d/msgid/elasticsearch/CANBTPCGRR63bQ3QcUaJ7yNU2h7wDDGaCEg5ODrSMM8xZiu9ZdA%40mail.gmail.com
https://groups.google.com/d/msgid/elasticsearch/CANBTPCGRR63bQ3QcUaJ7yNU2h7wDDGaCEg5ODrSMM8xZiu9ZdA%40mail.gmail.com?utm_medium=email&utm_source=footer
.

For more options, visit https://groups.google.com/d/optout.

--
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.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/CALY%3DcQAHB4oJnnb0MTCytc-4%3DDYcstmgrObgy%2B%3DT_u%3DtkWynHg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.