Does alias allow queries inside like below? Or it allows only filters? I am able to create the alias with below, but the match clause doesn't seem to be working. Any alternatives to this? Thanks
However, since this is really a filter (i.e. there is no scoring involved, the goal is just to tell if a document should come up in the alias or not), you can move the match from the must to the filter section, like this:
PUT /sports/_alias/baseball
{
"filter": { <--- change this
"bool": {
"filter": [
{ "match": { "content": "baseball" }}, <--- and this
{ "term": { "processed": "true" }}
]
}
}
}
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.