def search(self, search_text, limit=None, *, query=None, order_by=None,<EOL>batch=None):
if not isinstance(search_text, str) or not search_text:<EOL><INDENT>raise ValueError('<STR_LIT>')<EOL><DEDENT>url = self.build_url(<EOL>self._endpoints.get('<STR_LIT>').format(id=self.object_id,<EOL>search_text=search_text))<EOL>if limit is None or limit > self.protocol.max_top_value:<EOL><INDENT>batch = self.protocol.max_top_value<EOL><DEDENT>params = {'<STR_LIT>': batch if batch else limit}<EOL>if order_by:<EOL><INDENT>params['<STR_LIT>'] = order_by<EOL><DEDENT>if query:<EOL><INDENT>if query.has_filters:<EOL><INDENT>warnings.warn(<EOL>'<STR_LIT>'<EOL>'<STR_LIT>')<EOL>query.clear_filters()<EOL><DEDENT>if isinstance(query, str):<EOL><INDENT>params['<STR_LIT>'] = query<EOL><DEDENT>else:<EOL><INDENT>params.update(query.as_params())<EOL><DEDENT><DEDENT>response = self.con.get(url, params=params)<EOL>if not response:<EOL><INDENT>return iter(())<EOL><DEDENT>data = response.json()<EOL>items = (<EOL>self._classifier(item)(parent=self, **{self._cloud_data_key: item})<EOL>for item in data.get('<STR_LIT:value>', []))<EOL>next_link = data.get(NEXT_LINK_KEYWORD, None)<EOL>if batch and next_link:<EOL><INDENT>return Pagination(parent=self, data=items,<EOL>constructor=self._classifier,<EOL>next_link=next_link, limit=limit)<EOL><DEDENT>else:<EOL><INDENT>return items<EOL><DEDENT>
Search for DriveItems under this folder
        The search API uses a search service under the covers,
        which requires indexing of content.

        As a result, there will be some time between creation of an item
        and when it will appear in search results.

        :param str search_text: The query text used to search for items.
         Values may be matched across several fields including filename,
         metadata, and file content.
        :param int limit: max no. of folders to get. Over 999 uses batch.
        :param query: applies a OData filter to the request
        :type query: Query or str
        :param order_by: orders the result set based on this condition
        :type order_by: Query or str
        :param int batch: batch size, retrieves items in
         batches allowing to retrieve more items than the limit.
        :return: list of items in this folder
        :rtype: list[DriveItem] or Pagination