improve search method

if package summary is None, this will break search method.
Merge pull request #7 from lxneng/fix_search

improve search method