code: def get_raw_query(self):
          
          query = self.base_query.copy()
          search_query = self.search_query.copy()
          query.update(search_query)
  
          # Add sorting criteria
          sorting = self.resolve_sorting(query)
          query.update(sorting)
  
          # Check if sort_on is an index and if is sortable. Otherwise, assume
          # the sorting must be done manually
          catalog = api.get_tool(self.catalog_name)
          sort_on = query.get("sort_on", None)
          if sort_on and not self.is_sortable_index(sort_on, catalog):
              del(query["sort_on"])
          return query
docs: Returns the raw query to use for current search, based on the
          base query + update query