Fix & polish code of SearchBundle
Merge pull request #2170 from stloyd/bugfix/search

Fix & polish code of SearchBundle