code: def search(self, text, includes=None, doc_type=None, limit=None,
                 autocomplete=False, promulgated_only=False, tags=None,
                 sort=None, owner=None, series=None):
          '''
          Search for entities in the charmstore.
          @param text The text to search for.
          @param includes What metadata to return in results (e.g. charm-config).
          @param doc_type Filter to this type: bundle or charm.
          @param limit Maximum number of results to return.
          @param autocomplete Whether to prefix/suffix match search terms.
          @param promulgated_only Whether to filter to only promulgated charms.
          @param tags The tags to filter; can be a list of tags or a single tag.
          @param sort Sorting the result based on the sort string provided
              which can be name, author, series and - in front for descending.
          @param owner Optional owner. If provided, search results will only
              include entities that owner can view.
          @param series The series to filter; can be a list of series or a
              single series.
          '''
          queries = self._common_query_parameters(doc_type, includes, owner,
                                                  promulgated_only, series, sort)
          if len(text):
              queries.append(('text', text))
          if limit is not None:
              queries.append(('limit', limit))
          if autocomplete:
              queries.append(('autocomplete', 1))
          if tags is not None:
              if type(tags) is list:
                  tags = ','.join(tags)
              queries.append(('tags', tags))
          if len(queries):
              url = '{}/search?{}'.format(self.url, urlencode(queries))
          else:
              url = '{}/search'.format(self.url)
          data = self._get(url)
          return data.json()['Results']