<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def search(self, line):
 """CN search."""

        if self._session.get(d1_cli.impl.session.QUERY_ENGINE_NAME) == "solr":
            return self._search_solr(line)
        raise d1_cli.impl.exceptions.InvalidArguments(
            "Unsupported query engine: {}".format(
                self._session.get(d1_cli.impl.session.QUERY_ENGINE_NAME)
            )
        )