CanMatch search phase and AliasFilter

Hi,

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 ?

Thanks

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.

@jimczi This is the related issue https://github.com/elastic/elasticsearch/issues/55090

1 Like

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.