def search(*, document: Document, sort, limit, offset, **kwargs): s = document.search() # TODO: Define search criteria if sort: s = SearchClass._sort_helper(s, sort, kwargs) s = SearchClass._pagination_helper(s, limit, offset) return s
def search_by_doc_id(self, es_connection: Elasticsearch, document: Document = None, *args): """ Search the client_document in Elasticsearch. This should be override by the Document Dao :param es_connection: :param document: :return: doc_status, doc_meta """ return document.search(using=es_connection)