Use proper ES query.

This utilizes bitsets and caching correctly.