Module ImportFrom alias Import alias ImportFrom alias ImportFrom alias alias ImportFrom alias alias Assign NameStore Call AttributeLoad NameLoad attr Str ClassDef bases NameLoad body FunctionDef arguments args NameParam defaults body Expr Str Return SubscriptLoad AttributeLoad NameLoad attr Index Num decorator_list NameLoad decorator_list ClassDef bases NameLoad body Pass decorator_list FunctionDef arguments args NameParam defaults body Expr Str If Call NameLoad NameLoad NameLoad body Return TupleLoad Str NameLoad Assign NameStore Call AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr Str Str Assign NameStore Dict NameLoad Dict For NameStore TupleLoad Str Str Str Str Str Str Str Str Str Str Str body If CompareIn NameLoad NameLoad body Assign SubscriptStore SubscriptLoad NameLoad Index NameLoad Index NameLoad Call AttributeLoad NameLoad attr NameLoad If CompareEq NameLoad Str body Return TupleLoad NameLoad NameLoad Return TupleLoad NameLoad Call AttributeLoad NameLoad attr Str NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam defaults body Expr Str Assign NameStore ListLoad Assign TupleStore NameStore NameStore TupleLoad Num Num For TupleStore NameStore NameStore NameLoad body Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assign NameStore BinOpAdd Call NameLoad NameLoad Num If CompareIsNot NameLoad NameLoad body Assign NameStore Call AttributeLoad NameLoad attr NameLoad AugAssignAdd NameStore BinOpAdd Call NameLoad NameLoad Num If BoolOpAnd NameLoad BoolOpOr CompareGt BinOpAdd NameLoad NameLoad NameLoad CompareEq NameLoad NameLoad body Expr Yield NameLoad Assign NameStore ListLoad Assign TupleStore NameStore NameStore TupleLoad Num Num Expr Call AttributeLoad NameLoad attr NameLoad If CompareIsNot NameLoad NameLoad body Expr Call AttributeLoad NameLoad attr NameLoad AugAssignAdd NameStore NameLoad AugAssignAdd NameStore Num If NameLoad body Expr Yield NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam defaults NameLoad NameLoad kwarg body Expr Str Assign NameStore ListLoad TryExcept body Assign NameStore Call AttributeLoad NameLoad attr BinOpAdd Call AttributeLoad Str attr NameLoad Str NameLoad handlers ExceptHandler type NameLoad name NameStore body If NameLoad body Raise NameLoad Assign NameStore Call NameLoad NameLoad Assign NameStore ListLoad Assign NameStore Call NameLoad AttributeLoad AttributeLoad AttributeLoad NameLoad attr attr attr NameLoad While NameLoad body TryExcept body Assign NameStore Call NameLoad NameLoad Assign TupleStore NameStore NameStore Call AttributeLoad NameLoad attr Assign NameStore Dict Str Str Str NameLoad AttributeLoad NameLoad attr NameLoad If CompareNotEq NameLoad Str body Assign SubscriptStore NameLoad Index Str Call NameLoad NameLoad Expr Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr Dict NameLoad NameLoad handlers ExceptHandler type NameLoad body Break If NameLoad body Raise Call NameLoad BinOpMod Str Call NameLoad NameLoad NameLoad orelse For NameStore NameLoad body Expr Yield TupleLoad NameLoad NameLoad Return For TupleStore NameStore NameStore Call NameLoad Call NameLoad Str SubscriptLoad NameLoad Index Str body Assign NameStore CompareLtELt Num Call AttributeLoad NameLoad attr Str Num Num If BoolOpAnd UnaryOpNot NameLoad NameLoad body Expr Call AttributeLoad NameLoad attr Dict NameLoad NameLoad If BoolOpOr NameLoad UnaryOpNot NameLoad body Expr Yield TupleLoad NameLoad Dict NameLoad NameLoad If NameLoad body Raise Call NameLoad BinOpMod Str Call NameLoad NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam NameParam NameParam defaults Num BinOpMult BinOpMult Num Num Num NameLoad NameLoad NameLoad kwarg body Expr Str Assign NameStore Call NameLoad NameLoad NameLoad For NameStore Call NameLoad NameLoad NameLoad NameLoad AttributeLoad AttributeLoad NameLoad attr attr body For NameStore Call NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad body Expr Yield NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults NameLoad kwarg body Expr Str Assign TupleStore NameStore NameStore TupleLoad Num Num Assign NameStore ListLoad For TupleStore NameStore NameStore Call NameLoad NameLoad NameLoad NameLoad body If UnaryOpNot NameLoad body If UnaryOpNot NameLoad body Expr Call AttributeLoad NameLoad attr NameLoad AugAssignAdd NameStore Num orelse AugAssignAdd NameStore Num Return TupleLoad NameLoad IfExp NameLoad NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam NameParam defaults Num Num BinOpMult BinOpMult Num Num Num NameLoad kwarg body Expr Str ImportFrom alias Assign NameStore Call NameLoad NameLoad NameLoad Assign NameStore Call NameLoad NameLoad TryFinally body For NameStore Call AttributeLoad NameLoad attr Lambda arguments args NameParam defaults Call NameLoad Call NameLoad NameLoad NameLoad NameLoad Call NameLoad NameLoad NameLoad NameLoad AttributeLoad AttributeLoad NameLoad attr attr body For NameStore NameLoad body Expr Yield NameLoad finalbody Expr Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam defaults NameLoad Str NameLoad NameLoad kwarg body Expr Str If UnaryOpNot NameLoad body Assign NameStore IfExp NameLoad Call AttributeLoad NameLoad attr Dict Assign SubscriptStore NameLoad Index Str Str Assign NameStore Call AttributeLoad NameLoad attr keyword NameLoad keyword NameLoad NameLoad Assign NameStore Call AttributeLoad NameLoad attr Str If CompareIs NameLoad NameLoad body Return Assign NameStore NameLoad While NameLoad body If NameLoad body Assign NameStore NameLoad orelse Assign NameStore Call AttributeLoad NameLoad attr NameLoad keyword NameLoad For NameStore SubscriptLoad SubscriptLoad NameLoad Index Str Index Str body Expr Yield NameLoad If SubscriptLoad SubscriptLoad NameLoad Index Str Index Str body Expr Call AttributeLoad NameLoad attr Str SubscriptLoad SubscriptLoad NameLoad Index Str Index Str SubscriptLoad SubscriptLoad NameLoad Index Str Index Str If NameLoad body Raise Call NameLoad BinOpMod Str TupleLoad SubscriptLoad SubscriptLoad NameLoad Index Str Index Str SubscriptLoad SubscriptLoad NameLoad Index Str Index Str Assign NameStore Call AttributeLoad NameLoad attr Str If BoolOpOr CompareIs NameLoad NameLoad UnaryOpNot SubscriptLoad SubscriptLoad NameLoad Index Str Index Str body Break decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam NameParam NameParam NameParam NameParam defaults NameLoad NameLoad Num Str Dict Dict body Expr Str Assign NameStore IfExp CompareIs NameLoad NameLoad NameLoad NameLoad Assign NameStore Call NameLoad NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword TupleLoad Str Str Str Str NameLoad FunctionDef arguments args NameParam NameParam defaults body For NameStore NameLoad body Assign SubscriptStore NameLoad Index Str NameLoad If CompareIn Str NameLoad body Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Str Expr Yield NameLoad decorator_list Assign NameStore Dict Str NameLoad Expr Call AttributeLoad NameLoad attr NameLoad Return Call NameLoad NameLoad Call NameLoad NameLoad NameLoad keyword NameLoad NameLoad decorator_list
N/A __future__ unicode_literals N/A logging operator methodcaller exceptions ElasticsearchException TransportError compat map string_types N/A logger N/A N/A logging getLogger elasticsearch.helpers BulkIndexError N/A ElasticsearchException N/A errors N/A N/A self N/A N/A N/A  List of errors from execution of the last chunk.  N/A N/A N/A self args N/A 1 N/A property N/A ScanError N/A ElasticsearchException N/A N/A N/A expand_action N/A N/A data N/A N/A N/A 
    From one document or action definition passed in by the user extract the
    action/data lines needed for elasticsearch's
    :meth:`~elasticsearch.Elasticsearch.bulk` api.
     N/A N/A isinstance data string_types N/A N/A N/A {"index":{}} data N/A data N/A N/A data copy N/A op_type N/A N/A data pop _op_type index N/A action N/A op_type N/A N/A key N/A _index _parent _percolate _routing _timestamp _ttl _type _version _version_type _id _retry_on_conflict N/A N/A N/A key data N/A N/A N/A N/A action N/A op_type N/A key N/A N/A data pop key N/A N/A op_type delete N/A N/A N/A action None N/A N/A action N/A N/A data get _source data N/A _chunk_actions N/A N/A actions chunk_size max_chunk_bytes serializer N/A N/A N/A 
    Split actions into chunks by number or size, serialize them into strings in
    the process.
     N/A bulk_actions N/A N/A N/A size action_count N/A 0 0 N/A N/A action data actions N/A N/A action N/A N/A serializer dumps action N/A cur_size N/A N/A len action 1 N/A N/A data None N/A N/A data N/A N/A serializer dumps data N/A cur_size N/A N/A len data 1 N/A N/A bulk_actions N/A N/A N/A size cur_size max_chunk_bytes N/A action_count chunk_size N/A N/A N/A bulk_actions N/A bulk_actions N/A N/A N/A size action_count N/A 0 0 N/A N/A N/A bulk_actions append action N/A N/A data None N/A N/A N/A N/A bulk_actions append data N/A size cur_size N/A action_count 1 N/A bulk_actions N/A N/A N/A bulk_actions N/A _process_bulk_chunk N/A N/A client bulk_actions raise_on_exception raise_on_error N/A True True kwargs N/A N/A 
    Send a bulk request to elasticsearch and process the output.
     N/A errors N/A N/A N/A N/A resp N/A N/A client bulk N/A N/A N/A join bulk_actions kwargs N/A N/A N/A TransportError N/A e N/A N/A raise_on_exception N/A N/A e N/A err_message N/A str e N/A exc_errors N/A N/A bulk_data N/A map N/A N/A N/A client transport serializer loads bulk_actions N/A True N/A N/A N/A N/A action N/A next bulk_data N/A N/A op_type action N/A N/A action popitem N/A info N/A error status exception err_message N/A e status_code e N/A N/A op_type delete N/A N/A N/A info N/A data N/A next bulk_data N/A N/A N/A info update action N/A N/A N/A exc_errors append N/A op_type info N/A N/A N/A StopIteration N/A N/A N/A raise_on_error N/A N/A N/A BulkIndexError N/A %i document(s) failed to index. N/A len exc_errors exc_errors N/A N/A err exc_errors N/A N/A N/A N/A False err N/A N/A N/A op_type item N/A map N/A methodcaller popitem N/A resp N/A items N/A N/A ok N/A 200 N/A N/A item get status 500 300 N/A N/A N/A ok raise_on_error N/A N/A N/A N/A errors append N/A op_type item N/A N/A ok N/A errors N/A N/A N/A N/A ok N/A op_type item N/A errors N/A N/A N/A BulkIndexError N/A %i document(s) failed to index. N/A len errors errors N/A streaming_bulk N/A N/A client actions chunk_size max_chunk_bytes raise_on_error expand_action_callback raise_on_exception N/A 500 N/A N/A 100 1024 1024 True expand_action True kwargs N/A N/A 
    Streaming bulk consumes actions from the iterable passed in and yields
    results per action. For non-streaming usecases use
    :func:`~elasticsearch.helpers.bulk` which is a wrapper around streaming
    bulk that returns summary information about the bulk operation once the
    entire input is consumed and sent.


    :arg client: instance of :class:`~elasticsearch.Elasticsearch` to use
    :arg actions: iterable containing the actions to be executed
    :arg chunk_size: number of docs in one chunk sent to es (default: 500)
    :arg max_chunk_bytes: the maximum size of the request in bytes (default: 100MB)
    :arg raise_on_error: raise ``BulkIndexError`` containing errors (as `.errors`)
        from the execution of the last chunk when some occur. By default we raise.
    :arg raise_on_exception: if ``False`` then don't propagate exceptions from
        call to ``bulk`` and just report the items that failed as failed.
    :arg expand_action_callback: callback executed on each action passed in,
        should return a tuple containing the action line and the data line
        (`None` if data line should be omitted).
     N/A actions N/A map expand_action_callback actions N/A bulk_actions N/A _chunk_actions actions chunk_size max_chunk_bytes N/A N/A client transport serializer N/A N/A result N/A _process_bulk_chunk client bulk_actions raise_on_exception raise_on_error kwargs N/A N/A N/A result N/A bulk N/A N/A client actions stats_only N/A False kwargs N/A N/A 
    Helper for the :meth:`~elasticsearch.Elasticsearch.bulk` api that provides
    a more human friendly interface - it consumes an iterator of actions and
    sends them to elasticsearch in chunks. It returns a tuple with summary
    information - number of successfully executed actions and either list of
    errors or number of errors if `stats_only` is set to `True`.

    See :func:`~elasticsearch.helpers.streaming_bulk` for more accepted
    parameters

    :arg client: instance of :class:`~elasticsearch.Elasticsearch` to use
    :arg actions: iterator containing the actions
    :arg stats_only: if `True` only report number of successful/failed
        operations instead of just number of successful and a list of error responses

    Any additional keyword arguments will be passed to
    :func:`~elasticsearch.helpers.streaming_bulk` which is used to execute
    the operation.
     N/A N/A success failed N/A 0 0 N/A errors N/A N/A N/A ok item N/A streaming_bulk client actions kwargs N/A N/A N/A ok N/A N/A N/A stats_only N/A N/A N/A N/A errors append item N/A failed 1 N/A N/A success 1 N/A N/A success N/A stats_only failed errors N/A parallel_bulk N/A N/A client actions thread_count chunk_size max_chunk_bytes expand_action_callback N/A 4 500 N/A N/A 100 1024 1024 expand_action kwargs N/A N/A 
    Parallel version of the bulk helper run in multiple threads at once.

    :arg client: instance of :class:`~elasticsearch.Elasticsearch` to use
    :arg actions: iterator containing the actions
    :arg thread_count: size of the threadpool to use for the bulk requests
    :arg chunk_size: number of docs in one chunk sent to es (default: 500)
    :arg max_chunk_bytes: the maximum size of the request in bytes (default: 100MB)
    :arg raise_on_error: raise ``BulkIndexError`` containing errors (as `.errors`)
        from the execution of the last chunk when some occur. By default we raise.
    :arg raise_on_exception: if ``False`` then don't propagate exceptions from
        call to ``bulk`` and just report the items that failed as failed.
    :arg expand_action_callback: callback executed on each action passed in,
        should return a tuple containing the action line and the data line
        (`None` if data line should be omitted).
     multiprocessing.dummy Pool N/A actions N/A map expand_action_callback actions N/A pool N/A Pool thread_count N/A N/A N/A result N/A N/A pool imap N/A N/A N/A chunk N/A N/A list N/A _process_bulk_chunk client chunk kwargs N/A _chunk_actions actions chunk_size max_chunk_bytes N/A N/A client transport serializer N/A N/A item result N/A N/A N/A item N/A N/A N/A N/A pool close N/A N/A N/A pool join N/A scan N/A N/A client query scroll raise_on_error preserve_order N/A None 5m True False kwargs N/A N/A 
    Simple abstraction on top of the
    :meth:`~elasticsearch.Elasticsearch.scroll` api - a simple iterator that
    yields all hits as returned by underlining scroll requests.

    By default scan does not return results in any pre-determined order. To
    have a standard order in the returned documents (either by score or
    explicit sort definition) when scrolling, use ``preserve_order=True``. This
    may be an expensive operation and will negate the performance benefits of
    using ``scan``.

    :arg client: instance of :class:`~elasticsearch.Elasticsearch` to use
    :arg query: body for the :meth:`~elasticsearch.Elasticsearch.search` api
    :arg scroll: Specify how long a consistent view of the index should be
        maintained for scrolled search
    :arg raise_on_error: raises an exception (``ScanError``) if an error is
        encountered (some shards fail to execute). By default we raise.
    :arg preserve_order: don't set the ``search_type`` to ``scan`` - this will
        cause the scroll to paginate with preserving the order. Note that this
        can be an extremely expensive operation and can easily lead to
        unpredictable results, use with caution.

    Any additional keyword arguments will be passed to the initial
    :meth:`~elasticsearch.Elasticsearch.search` call::

        scan(es,
            query={"query": {"match": {"title": "python"}}},
            index="orders-*",
            doc_type="books"
        )

     N/A N/A preserve_order N/A N/A body N/A query N/A N/A query copy N/A N/A N/A body N/A sort _doc N/A resp N/A N/A client search body query scroll scroll kwargs N/A scroll_id N/A N/A resp get _scroll_id N/A N/A scroll_id None N/A N/A N/A first_run True N/A True N/A N/A first_run N/A N/A first_run False N/A N/A resp N/A N/A client scroll scroll_id scroll scroll N/A hit N/A N/A resp N/A hits N/A hits N/A N/A N/A hit N/A N/A N/A resp N/A _shards N/A failed N/A N/A N/A N/A logger warning Scroll request has failed on %d shards out of %d. N/A N/A resp N/A _shards N/A failed N/A N/A resp N/A _shards N/A total N/A raise_on_error N/A N/A N/A ScanError N/A Scroll request has failed on %d shards out of %d. N/A N/A N/A resp N/A _shards N/A failed N/A N/A resp N/A _shards N/A total N/A scroll_id N/A N/A resp get _scroll_id N/A N/A N/A scroll_id None N/A N/A N/A resp N/A hits N/A hits N/A N/A N/A reindex N/A N/A client source_index target_index query target_client chunk_size scroll scan_kwargs bulk_kwargs N/A None None 500 5m N/A N/A N/A N/A 
    Reindex all documents from one index that satisfy a given query
    to another, potentially (if `target_client` is specified) on a different cluster.
    If you don't specify the query you will reindex all the documents.

    .. note::

        This helper doesn't transfer mappings, just the data.

    :arg client: instance of :class:`~elasticsearch.Elasticsearch` to use (for
        read if `target_client` is specified as well)
    :arg source_index: index (or list of indices) to read documents from
    :arg target_index: name of the index in the target cluster to populate
    :arg query: body for the :meth:`~elasticsearch.Elasticsearch.search` api
    :arg target_client: optional, is specified will be used for writing (thus
        enabling reindex between clusters)
    :arg chunk_size: number of docs in one chunk sent to es (default: 500)
    :arg scroll: Specify how long a consistent view of the index should be
        maintained for scrolled search
    :arg scan_kwargs: additional kwargs to be passed to
        :func:`~elasticsearch.helpers.scan`
    :arg bulk_kwargs: additional kwargs to be passed to
        :func:`~elasticsearch.helpers.bulk`
     N/A target_client N/A N/A target_client None client target_client N/A docs N/A scan client query query index source_index scroll scroll fields N/A _source _parent _routing _timestamp scan_kwargs _change_doc_index N/A N/A hits index N/A N/A N/A h hits N/A N/A N/A h N/A _index index N/A N/A fields h N/A N/A N/A N/A h update N/A N/A h pop fields N/A N/A h N/A N/A kwargs N/A stats_only True N/A N/A N/A kwargs update bulk_kwargs N/A N/A bulk target_client N/A _change_doc_index docs target_index chunk_size chunk_size kwargs N/A