I want to search for a word in documents I have stored in Elasticsearch 7.3
An example of what I would like on previous versions of Elasticsearch that worked is:
{
"query": {
"bool": {
"must": [
{
"match": {
"_all": "oliver"
}
}
],
"must_not": [],
"should": []
}
},
"from": 0,
"size": 10,
"sort": [],
"aggs": {}
}
But this query will not work on Elasticsearch 7+ because _all
has been removed. How can I write the query to accomplish the same thing now that the _all
field is gone?
Note: I've read the suggestions to use copy_to
to copy all fields into a custom field but that requires explicitly writing out each field to include in the all_fields field. Since I have lots of little fields I am trying to avoid this and instead replicate the behavior that being able to query _all allowed.
copy_to
requires explicitly writing out each field to include in theall_fields
field. Since I have lots of little fields I am trying to avoid this and instead replicate the behavior that being able to query_all
allowed. – Quite