Enable sort and aggregation on primitive text array
Support sort and aggregation for array of strings where keyword mapping is not enabled, on any attribute in search response. The attribute can be either the following:
- Immediate child of 'data' node (Already supported)
- Any attribute which has values as array of strings
- Attribute which is inside array of object. (nested data type)
Currently, error 400 is returned if trying to aggregate array of strings.
Use-case: Using
"aggregateBy": "{\"aggs\":{\"terms\":{\"field\":\"data.attributes\",\"size\":10}}}"
Response:
{
"code": 400,
"reason": "Bad Request",
"message": "Facets are not support for one or more of the specified fields. Please add search_ext-facet tag to schema or select a different field."
}
Edited by An Ngo