When a field contains an object, in a terms aggregation I can specify a 
specific object property that contains the terms I want to use eg

{
    "terms": {
        "field": "fieldName.propertyContainingTerms"
    }
}

So with a array type field that contains a list of strings ["first", 
"second", "third"] I should be able to do the same via array indices

{
    "terms": {
        "field": "fieldName[0]"
    }
}

But this doesn't work. Am I using the wrong syntax or is this just not 
possible?

My current solution is to use objects with integers converted to strings as 
the property keys eg "fieldName.0", it works but feels wrong.



-- 
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/002d9cd8-04b6-4dec-91a0-d49f5f187a2d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to