Small refactoring in search directive
Merge pull request #1351 from gjn/dev_featurehighlight

Small refactoring in search directive