- results = srch.search_perfect(toks) + srch.search_everywhere(toks)
- results.sort(lambda a, b: cmp(a[0], b[0]) < 0)
- print("searched, results are: %s\n" % results)
+ results = SearchResult.aggregate(srch.search_perfect_book(toks),
+ srch.search_perfect_parts(toks),
+ srch.search_everywhere(toks))
+ results.sort(reverse=True)
+
+ for r in results:
+ print r.parts