If an aliased index contains a filter, the SearchService#canMatch method would rewrite it. However, that method doesn't check if the alias filter got rewritten to a match_none which would indicate that the shard could be skipped.
Can you clarify why the alias filter is not taken into account by canMatch ?
It's not implemented but this is a good idea. I guess that you're using a range query in the alias filter ? I don't see any reason why we wouldn't do it so could you please open an issue in the public github ? If you're interested you can also open a pull request directly since the change should be straightforward.
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.