Hi,
You should be able to do it with the Java API with something like
(untested):
AggregationBuildersfilter("steve_unique").filter(FilterBuilders.termFilter("user.screen_name",
"steve")).subAggregation(AggregationBuilders.cardinality("unique").field("entities.hashtags.text"))
On Mon, Apr 14, 2014 at 8:21 PM, Robert Douglas <[email protected]> wrote:
> Hi all,
>
> I'm working on putting together a query that requires nested aggregations
> in the form:
>
> "aggs": {
> "steve_unique": {
> "filter": {
> "term": {
> "user.screen_name": "steve"
> }
> },
> "aggs": {
> "unique": {
> "cardinality": {
> "field": "entities.hashtags.text"
> }
> }
> }
> }
> }
>
> Looking through the API, I'm not noticing an obvious way to go about
> forming this part of the query. Is there something built in that would
> facilitate this?
>
> Thanks,
> Robert
>
> --
> 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 [email protected].
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/elasticsearch/c9d2bd76-9a4b-44e7-a40a-708894c63cc0%40googlegroups.com<https://groups.google.com/d/msgid/elasticsearch/c9d2bd76-9a4b-44e7-a40a-708894c63cc0%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>
--
Adrien Grand
--
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 [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/elasticsearch/CAL6Z4j6ufTa6Mb%3Dq3EnuCVx4g6-0jzT7d64j-ODxWVnWHGG5sQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.