Here I have several documents storaged in Elasticsearch.
document_example: { "data": ["red","brown", "black"] }
When I use prefix search(see below) to check whether there are some items in the array 'data' with prefix 'b', the result comes out with null while the document_example exists in Elasticsearch.
It seems that prefix search can be used for string, however excluded items in array.
{"query":
{
"prefix": { "data" : "b" }
}
}
So if I wanna find the data's prefix in array, how should I search in Elasticsearch? Thanks.