~fabricematrat/charmworld/redirect-charm

« back to all changes in this revision

Viewing changes to charmworld/search.py

  • Committer: Brad Crittenden
  • Date: 2014-10-15 18:04:41 UTC
  • mto: This revision was merged to the branch mainline in revision 518.
  • Revision ID: bac@canonical.com-20141015180441-9y4d3a7f5wdiclfc
Rearrange code to be more clear.

Show diffs side-by-side

added added

removed removed

Lines of Context:
694
694
 
695
695
        try:
696
696
            hits = self._unlimited_search(dsl, limit)
 
697
            if start is not None:
 
698
                hits = hits[start:]
697
699
        except ElasticHttpError:
698
700
            hits = []
699
701
 
700
 
        if start is not None:
701
 
            hits = hits[start:]
702
 
 
703
702
        return [
704
703
            dict(doctype=hit['_type'], data=hit['_source']['data'])
705
704
            for hit in hits]