Beispiel #1
0
 def get_editions(self, offset, limit=20):
     if self._solr_result and offset+limit < len(self._solr_result):
         result = self._solr_result[offset:offset+limit]
     else:
         name = self.name or ""
         result = SearchProcessor().search({"subjects": name, 'offset': offset, 'limit': limit})
     return result['docs']
Beispiel #2
0
 def _get_solr_result(self):
     if not self._solr_result:
         name = self.name or ""
         q = {'subjects': name, "facets": True}
         self._solr_result = SearchProcessor().search(q)
     return self._solr_result