Any way this could be turned into a filter instead of a query? Looks like a regex filter could work as well and it's cacheable.