ES connection object.
Add an alias to point to a set of indices.
Performs the analysis process on a text and return the tokens breakdown of the text
Change the aliases stored.
commands is a list of 3-tuples; (command, index, alias), where command is one of “add” or “remove”, and index and alias are the index and alias to add or remove.
Close an index.
Check the current cluster health. Request Parameters
The cluster health API accepts the following request parameters:
Parameters: |
|
---|
The cluster nodes info API allows to retrieve one or more (or all) of the cluster nodes information.
Retrieve the cluster state.
Parameters: |
|
---|
The cluster nodes info API allows to retrieve one or more (or all) of the cluster nodes information.
Collect info about the connection and fill the info dictionary
Execute a query against one or more indices and get hits count.
Creates an index with optional settings. Settings must be a dictionary which will be converted to JSON. Elasticsearch also accepts yaml, but we are only passing JSON.
Creates an index if it doesn’t already exist.
If supplied, settings must be a dictionary.
Create a percolator document
Any kwargs will be added to the document as extra properties.
Create a river
Delete a typed JSON document from a specific index based on its id. If bulk is True, the delete operation is put in bulk mode.
Delete documents from one or more indices and one or more types based on a query.
Delete an alias.
The specified index or indices are deleted from the alias, if they are in it to start with. This won’t report an error even if the indices aren’t present in the alias.
Deletes an index.
Deletes an index if it exists.
Delete a typed JSON document type from a specific index.
Delete a percolator document
Delete a river
Flushes one or more indices (clear memory)
Wait to process all pending operations
Force executing of all bulk data
Gateway snapshot one or more indices
Get a typed JSON document from an index based on its id.
Get the index or indices pointed to by a given alias.
Raises IndexMissingException if the alias does not exist.
Otherwise, returns a list of index names.
Return the filename and memory data stream
Get a dict holding an entry for each index which exists.
If include_alises is True, the dict will also contain entries for aliases.
The key for each entry in the dict is the index or alias name. The value is a dict holding the following properties:
Register specific mapping definition for a specific type against one or more indices.
Index a typed JSON document into a specific index and make it searchable.
Function helper for fast inserting
header and document must be string “
” ended
Execute a “more like this” search query against one or more fields and get back search hits.
Open an index.
Optimize one or more indices.
indices is the list of indices to optimise. If not supplied, or “_all”, all indices are optimised.
wait_for_merge (boolean): If True, the operation will not return until the merge has been completed. Defaults to False.
max_num_segments (integer): The number of segments to optimize to. To fully optimize the index, set it to 1. Defaults to half the number configured by the merge policy (which in turn defaults to 10).
only_expunge_deletes (boolean): Should the optimize process only expunge segments with deletes in it. In Lucene, a document is not deleted from a segment, just marked as deleted. During a merge process of segments, a new segment is created that does have those deletes. This flag allow to only merge segments that have deletes. Defaults to false.
refresh (boolean): Should a refresh be performed after the optimize. Defaults to true.
flush (boolean): Should a flush be performed after the optimize. Defaults to true.
Match a query with a document
Store a file in a index
Register specific mapping definition for a specific type against one or more indices.
Refresh one or more indices
timesleep: seconds to wait
Execute a search query against one or more indices and and reindex the hits. query must be a dictionary or a Query object that will convert to Query DSL. Note: reindex is only available in my ElasticSearch branch on github.
Return a generator which will scan against one or more indices and iterate over the search hits. (currently support only by ES Master)
query must be a Search object, a Query object, or a custom dictionary of search parameters using the query DSL to be passed directly.
Execute a search against one or more indices to get the resultset.
query must be a Search object, a Query object, or a custom dictionary of search parameters using the query DSL to be passed directly.
Execute a search against one or more indices to get the search hits.
query must be a Search object, a Query object, or a custom dictionary of search parameters using the query DSL to be passed directly.
Executes a scrolling given an scroll_id
Set an alias.
This handles removing the old list of indices pointed to by the alias.
Warning: there is a race condition in the implementation of this function - if another client modifies the indices which this alias points to during this call, the old value of the alias may not be correctly set.
Retrieve the status of one or more indices
Update Settings of an index.
Convert a file to attachment
Decode some json to dict