Add filtering support for entities, and correctly handle filter-only searches, including intelligent ranking of results.