DB Search bug fix

Signed-off-by: Sampath Liyanage <plbsam@gmail.com>
test failure fixed

Signed-off-by: Sampath Liyanage <plbsam@gmail.com>
Merge pull request #976 from sampathLiyanage/bugfixdbsearch

DB Search bug fix #4299