- def search_phrase(self, searched, field='text', book=False, filters=None, snippets=False):
- return self._find_some_books(snippets)
-
- def search_some(self, searched, fields, book=True, filters=None, snippets=True, query_terms=None):
- return self._find_some_books(snippets, query_terms)
-
- # WTF
- def search_books(self, query, filters=None, max_results=10):
- return self._find_some_books(snippets, max_results=max_results)
-
- def search_everywhere(self, searched, query_terms=None):
- return []
-
- def hint_tags(self, query, pdcounter=True, prefix=True):
- return Tag.objects.exclude(category='set').order_by('?')[:randint(1, 10)]
-
- def hint_books(self, prefix):
- return Book.objects.order_by('?')[:randint(1, 10)]