Refactored search filter key generation