Add filter API to get_entries

This just builds where indexes and merges it with what's sent.