Esempio n. 1
0
 def getRecords(self, facet, term):
     fname = self.facets[facet]['f']
     sc = self.getSolrClient()
     q = sc.prepareQueryTerm(fname, term)
     records = solrclient.SOLRArrayResponseIterator(
         sc,
         q,
         fq=self._filter_query,
         cols=self.fields,
         pagesize=ITERATOR_PER_FETCH)
     return records
Esempio n. 2
0
 def getAbstract(self, pid):
     self.logger.debug('getAbstract: {0}'.format(pid))
     sc = self.getSolrClient()
     q = sc.prepareQueryTerm('identifier', pid)
     records = solrclient.SOLRArrayResponseIterator(
         sc,
         q,
         fq=self._filter_query,
         cols=[
             'abstract',
         ],
         pagesize=ITERATOR_PER_FETCH)
     ret = ''
     for rec in records:
         if rec[0] is not None:
             ret = rec[0]
         break
     return ret