docs: def get_compositions_by_search(self, composition_query, composition_search):
          """Gets the search results matching the given search query using the given search.
  
          arg:    composition_query (osid.repository.CompositionQuery):
                  the composition query
          arg:    composition_search (osid.repository.CompositionSearch):
                  the composition search
          return: (osid.repository.CompositionSearchResults) - the
                  composition search results
          raise:  NullArgument - ``composition_query`` or
                  ``composition_search`` is ``null``
          raise:  OperationFailed - unable to complete request
          raise:  PermissionDenied - authorization failure
          raise:  Unsupported - ``composition_query`` or
                  ``composition_search`` is not of this service
          *compliance: mandatory -- This method must be implemented.*
  
          """
          # Implemented from template for
          # osid.resource.ResourceSearchSession.get_resources_by_search_template
          # Copied from osid.resource.ResourceQuerySession.get_resources_by_query_template
          and_list = list()
          or_list = list()
          for term in composition_query._query_terms:
              and_list.append({term: composition_query._query_terms[term]})
          for term in composition_query._keyword_terms:
              or_list.append({term: composition_query._keyword_terms[term]})
          if composition_search._id_list is not None:
              identifiers = [ObjectId(i.identifier) for i in composition_search._id_list]
              and_list.append({'_id': {'$in': identifiers}})
          if or_list:
              and_list.append({'$or': or_list})
          view_filter = self._view_filter()
          if view_filter:
              and_list.append(view_filter)
          if and_list:
              query_terms = {'$and': and_list}
          collection = JSONClientValidated('repository',
                                           collection='Composition',
                                           runtime=self._runtime)
          if composition_search.start is not None and composition_search.end is not None:
              result = collection.find(query_terms)[composition_search.start:composition_search.end]
          else:
              result = collection.find(query_terms)
          return searches.CompositionSearchResults(result, dict(composition_query._query_terms), runtime=self._runtime)