Refactored keyword search to common method.