(
            self, query_string=None, query_filter=None, query_dsl=None,
            indices=None, return_fields=None, scroll=True)
return event_generator
Search OpenSearch.

        Args:
            query_string: Query string.
            query_filter: Dictionary containing filters to apply.
            query_dsl: Dictionary containing OpenSearch DSL query.
            indices: List of indices to query.
            return_fields: List of fields to return.
            scroll: Boolean determining whether we support scrolling searches
                or not. Defaults to True.

        Returns:
            Generator of Event objects.

        Raises:
            ValueError: if neither query_string or query_dsl is provided.
Search OpenSearch.
Search OpenSearch .
def event_stream(
            self, query_string=None, query_filter=None, query_dsl=None,
            indices=None, return_fields=None, scroll=True):
        """Search OpenSearch.

        Args:
            query_string: Query string.
            query_filter: Dictionary containing filters to apply.
            query_dsl: Dictionary containing OpenSearch DSL query.
            indices: List of indices to query.
            return_fields: List of fields to return.
            scroll: Boolean determining whether we support scrolling searches
                or not. Defaults to True.

        Returns:
            Generator of Event objects.

        Raises:
            ValueError: if neither query_string or query_dsl is provided.
        """
        if not (query_string or query_dsl):
            raise ValueError('Both query_string and query_dsl are missing')

        # Query all sketch indices if none are specified.
        if not indices:
            indices = self._get_sketch_indices()

        if not query_filter:
            query_filter = {}

        return_fields = list(set(return_fields))

        if self.timeline_ids:
            timeline_ids = self.timeline_ids
        else:
            timeline_ids = None

        event_generator = self.datastore.search_stream(
            query_string=query_string,
            query_filter=query_filter,
            query_dsl=query_dsl,
            indices=indices,
            return_fields=return_fields,
            timeline_ids=timeline_ids,
            enable_scroll=scroll,
        )
        return event_generator
def event_stream ( self , query_string = None , query_filter = None , query_dsl = None , indices = None , return_fields = None , scroll = True ) : if not ( query_string or query_dsl ) : raise ValueError ( 'Both query_string and query_dsl are missing' ) # Query all sketch indices if none are specified. if not indices : indices = self . _get_sketch_indices ( ) if not query_filter : query_filter = { } return_fields = list ( set ( return_fields ) ) if self . timeline_ids : timeline_ids = self . timeline_ids else : timeline_ids = None event_generator = self . datastore . search_stream ( query_string = query_string , query_filter = query_filter , query_dsl = query_dsl , indices = indices , return_fields = return_fields , timeline_ids = timeline_ids , enable_scroll = scroll , ) return event_generator