def _do_search(self, q): ugly = worksearch.do_search({"q": q, "has_fulltext": "true", "public_scan": "true"}, None) results = web.storage({'num_found': ugly['num_found'], 'books': []}) works = [worksearch.get_doc(doc) for doc in ugly['docs']] for work in works: work.key = '/works/%s' % work.key for edition, work in _editions_for_works(works): results['books'].append((edition, work)) return results
def _do_search(self, q): ugly = worksearch.do_search({"q": q}, None) results = web.storage({'num_found': ugly['num_found'], 'docs': []}) for doc in ugly['docs']: results['docs'].append(worksearch.get_doc(doc)) return results