If I add a collapse clause to the following query the error
"unknown type for collapse
aircraft_type_search, only keywords and numbers are accepted"
is returned.
{
"query": {
"bool": {
"must": {
"bool": {
"must": [
{
"match": {
"aircraft_type_search": {
"query": "piper"
}
}
}
]
}
},
"filter": {
"bool": {
"must": {
"term": {
"display_picture": "yes"
}
}
}
}
}
},
"collapse": {
"field": "aircraft_type_search"
}
}
I have also tried 'aircraft_id' as the collapse field as that is an integer:
'aircraft_id' => [ 'type' => 'integer', "null_value" => "-1", "ignore_malformed" => 'true', 'include_in_all' => 'false', 'index' => 'not_analyzed' ]
but that resulted in the error.
ES7.1 on AWS Elastic Search service running through the elasticsearch php sdk.
If I remove the collapse clause the query works fine.
Any ideas on why this isn't working?