(self,
                query_string=None,
                query_dsl=None,
                query_filter=None,
                view=None,
                return_fields=None,
                as_pandas=False,
                max_entries=None,
                file_name='',
                as_object=False)
return search_obj.to_dict()
Explore the sketch.

        Args:
            query_string (str): OpenSearch query string.
            query_dsl (str): OpenSearch query DSL as JSON string.
            query_filter (dict): Filter for the query as a dict.
            view: View object instance (optional).
            return_fields (str): A comma separated string with a list of fields
                that should be included in the response. Optional and defaults
                to None.
            as_pandas (bool): Optional bool that determines if the results
                should be returned back as a dictionary or a Pandas DataFrame.
            max_entries (int): Optional integer denoting a best effort to limit
                the output size to the number of events. Events are read in,
                10k at a time so there may be more events in the answer back
                than this number denotes, this is a best effort.
            file_name (str): Optional filename, if provided the results of
                the query will be exported to a ZIP file instead of being
                returned back as a dict or a pandas DataFrame. The ZIP file
                will contain a METADATA file and a CSV with the results from
                the query.
            as_object (bool): Optional bool that determines whether the
                function will return a search object back instead of raw
                results.

        Returns:
            Dictionary with query results, a pandas DataFrame if as_pandas
            is set to True or a search.Search object if as_object is set
            to True. If file_name is provided then no value will be
            returned.

        Raises:
            ValueError: if unable to query for the results.
            RuntimeError: if the query is missing needed values, or if the
                sketch is archived.
Explore the sketch.
Explore the sketch .
def explore(self,
                query_string=None,
                query_dsl=None,
                query_filter=None,
                view=None,
                return_fields=None,
                as_pandas=False,
                max_entries=None,
                file_name='',
                as_object=False):
        """Explore the sketch.

        Args:
            query_string (str): OpenSearch query string.
            query_dsl (str): OpenSearch query DSL as JSON string.
            query_filter (dict): Filter for the query as a dict.
            view: View object instance (optional).
            return_fields (str): A comma separated string with a list of fields
                that should be included in the response. Optional and defaults
                to None.
            as_pandas (bool): Optional bool that determines if the results
                should be returned back as a dictionary or a Pandas DataFrame.
            max_entries (int): Optional integer denoting a best effort to limit
                the output size to the number of events. Events are read in,
                10k at a time so there may be more events in the answer back
                than this number denotes, this is a best effort.
            file_name (str): Optional filename, if provided the results of
                the query will be exported to a ZIP file instead of being
                returned back as a dict or a pandas DataFrame. The ZIP file
                will contain a METADATA file and a CSV with the results from
                the query.
            as_object (bool): Optional bool that determines whether the
                function will return a search object back instead of raw
                results.

        Returns:
            Dictionary with query results, a pandas DataFrame if as_pandas
            is set to True or a search.Search object if as_object is set
            to True. If file_name is provided then no value will be
            returned.

        Raises:
            ValueError: if unable to query for the results.
            RuntimeError: if the query is missing needed values, or if the
                sketch is archived.
        """
        logger.warning(
            'Using this function is discouraged, please consider using '
            'the search.Search object instead, which is more flexible.')

        if not (query_string or query_filter or query_dsl or view):
            raise RuntimeError('You need to supply a query or view')

        if self.is_archived():
            raise RuntimeError('Unable to query an archived sketch.')

        search_obj = search.Search(sketch=self)

        if view:
            logger.warning(
                'View objects will be deprecated soon, use search.Search '
                'objects instead.')
            search_obj.from_saved(view.id)

        else:
            search_obj.from_manual(
                query_string=query_string,
                query_dsl=query_dsl,
                query_filter=query_filter,
                return_fields=return_fields,
                max_entries=max_entries
            )
        if as_object:
            return search_obj

        if file_name:
            return search_obj.to_file(file_name)

        if as_pandas:
            return search_obj.to_pandas()

        return search_obj.to_dict()
def explore ( self , query_string = None , query_dsl = None , query_filter = None , view = None , return_fields = None , as_pandas = False , max_entries = None , file_name = '' , as_object = False ) : logger . warning ( 'Using this function is discouraged, please consider using ' 'the search.Search object instead, which is more flexible.' ) if not ( query_string or query_filter or query_dsl or view ) : raise RuntimeError ( 'You need to supply a query or view' ) if self . is_archived ( ) : raise RuntimeError ( 'Unable to query an archived sketch.' ) search_obj = search . Search ( sketch = self ) if view : logger . warning ( 'View objects will be deprecated soon, use search.Search ' 'objects instead.' ) search_obj . from_saved ( view . id ) else : search_obj . from_manual ( query_string = query_string , query_dsl = query_dsl , query_filter = query_filter , return_fields = return_fields , max_entries = max_entries ) if as_object : return search_obj if file_name : return search_obj . to_file ( file_name ) if as_pandas : return search_obj . to_pandas ( ) return search_obj . to_dict ( )