Oh, yes, I've enabled _index
so I can do term facet requests like:
{'field': '_index'}
{'field': '_type'}
And even:
{'fields': ['_index', '_type']}
There was a hope that this request does what I want, but it merely unites
facets:
{'_type': 'terms',
'missing': 0,
'other': 0,
'terms': [{'count': 198, 'term': 'comment'},
{'count': 99, 'term': 'light_beer'},
{'count': 99, 'term': 'dark_beer'}]}
Well, I want to concatenate index and type names and pass it to ES facets.
The only way I see is to use script
, but I don't know how to access
_index
and _type
from there.
Thank you for understanding.
On Thu, Apr 24, 2014 at 3:30 PM, Radu Gheorghe
radu.gheorghe@sematext.comwrote:
Hello,
I'm not sure if you're already aware of the predefined _index and _type
fields:
Elasticsearch Platform — Find real-time answers at scale | Elastic
Elasticsearch Platform — Find real-time answers at scale | Elastic
You can enable them so you can search and retrieve values like you would
with any other field.
Best regards,
Radu
On Thu, Apr 24, 2014 at 11:28 AM, Sviatoslav Abakumov <
abakumov.sviatoslav@progforce.com> wrote:
Hello,
I'd like to get how much documents of particular index AND type, like
this:
{'f4': {'_type': 'terms',
'missing': 0,
'other': 0,
'terms': [{'count': 99, 'term': 'light_beer/comment'},
{'count': 99, 'term': 'dark_beer/comment'}],
'total': 198}}
To do this I added fields __index
and __type
and filled them when I
was indexing documents.
I use term facet with "script": "_source.__index + '/' + _source.__type"
Is there a way to get index and type names from _index
(IndexLookup)or _source
(SourceLookup)?
Thank you.
--
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/80604448-0bd5-499f-9c13-de096a732981%40googlegroups.comhttps://groups.google.com/d/msgid/elasticsearch/80604448-0bd5-499f-9c13-de096a732981%40googlegroups.com?utm_medium=email&utm_source=footer
.
For more options, visit https://groups.google.com/d/optout.
--
Performance Monitoring * Log Analytics * Search Analytics
Solr & Elasticsearch Support * http://sematext.com/
--
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/uSUHj5LcGdw/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/CAHXA0_0z5jD8cZfkca8FNOmcg7FnEeXL_S%3DZmJVcDm7PArixLQ%40mail.gmail.comhttps://groups.google.com/d/msgid/elasticsearch/CAHXA0_0z5jD8cZfkca8FNOmcg7FnEeXL_S%3DZmJVcDm7PArixLQ%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/CAKmtHP-VZJ_gUG1Z7yESL6yihQCn8zZJ4kyZm%2B6FeAFJsvnMqA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.