标签:writing setting tput pytho operation ttl tag view return
All the API calls map the raw REST api as closely as possible, including the distinction between required and optional arguments to the calls. This means that the code makes distinction between positional and keyword arguments; we, however, recommend that people use keyword arguments for all calls for consistency and safety.
Note
for compatibility with the Python ecosystem we use from_
instead of from
and doc_type
instead of type
as parameter names.
Some parameters are added by the client itself and can be used in all API calls.
An API call is considered successful (and will return a response) if elasticsearch returns a 2XX response. Otherwise an instance of TransportError
(or a more specific subclass) will be raised. You can see other exception and error states in Exceptions. If you do not wish an exception to be raised you can always pass in an ignore
parameter with either a single status code that should be ignored or a list of them:
from elasticsearch import Elasticsearch
es = Elasticsearch()
# ignore 400 cause by IndexAlreadyExistsException when creating an index
es.indices.create(index=‘test-index‘, ignore=400)
# ignore 404 and 400
es.indices.delete(index=‘test-index‘, ignore=[400, 404])
Global timeout can be set when constructing the client (see Connection
‘s timeout
parameter) or on a per-request basis using request_timeout
(float value in seconds) as part of any API call, this value will get passed to the perform_request
method of the connection class:
# only wait for 1 second, regardless of the client‘s default
es.cluster.health(wait_for_status=‘yellow‘, request_timeout=1)
Note
Some API calls also accept a timeout
parameter that is passed to Elasticsearch server. This timeout is internal and doesn’t guarantee that the request will end in the specified time.
The filter_path
parameter is used to reduce the response returned by elasticsearch. For example, to only return _id
and _type
, do:
es.search(index=‘test-index‘, filter_path=[‘hits.hits._id‘, ‘hits.hits._type‘])
It also supports the *
wildcard character to match any field or part of a field’s name:
es.search(index=‘test-index‘, filter_path=[‘hits.hits._*‘])
elasticsearch.
Elasticsearch
(hosts=None, transport_class=<class ‘elasticsearch.transport.Transport‘>, **kwargs)Elasticsearch low-level client. Provides a straightforward mapping from Python to ES REST endpoints.
The instance has attributes cat
, cluster
, indices
, ingest
, nodes
, snapshot
and tasks
that provide access to instances of CatClient
, ClusterClient
, IndicesClient
,IngestClient
, NodesClient
, SnapshotClient
and TasksClient
respectively. This is the preferred (and only supported) way to get access to those classes and their methods.
You can specify your own connection class which should be used by providing the connection_class
parameter:
# create connection to localhost using the ThriftConnection
es = Elasticsearch(connection_class=ThriftConnection)
If you want to turn on Sniffing you have several options (described in Transport
):
# create connection that will automatically inspect the cluster to get
# the list of active nodes. Start with nodes running on ‘esnode1‘ and
# ‘esnode2‘
es = Elasticsearch(
[‘esnode1‘, ‘esnode2‘],
# sniff before doing anything
sniff_on_start=True,
# refresh nodes after a node fails to respond
sniff_on_connection_fail=True,
# and also every 60 seconds
sniffer_timeout=60
)
Different hosts can have different parameters, use a dictionary per node to specify those:
# connect to localhost directly and another node using SSL on port 443
# and an url_prefix. Note that ``port`` needs to be an int.
es = Elasticsearch([
{‘host‘: ‘localhost‘},
{‘host‘: ‘othernode‘, ‘port‘: 443, ‘url_prefix‘: ‘es‘, ‘use_ssl‘: True},
])
If using SSL, there are several parameters that control how we deal with certificates (see Urllib3HttpConnection
for detailed description of the options):
es = Elasticsearch(
[‘localhost:443‘, ‘other_host:443‘],
# turn on SSL
use_ssl=True,
# make sure we verify SSL certificates (off by default)
verify_certs=True,
# provide a path to CA certs on disk
ca_certs=‘/path/to/CA_certs‘
)
SSL client authentication is supported (see Urllib3HttpConnection
for detailed description of the options):
es = Elasticsearch(
[‘localhost:443‘, ‘other_host:443‘],
# turn on SSL
use_ssl=True,
# make sure we verify SSL certificates (off by default)
verify_certs=True,
# provide a path to CA certs on disk
ca_certs=‘/path/to/CA_certs‘,
# PEM formatted SSL client certificate
client_cert=‘/path/to/clientcert.pem‘,
# PEM formatted SSL client key
client_key=‘/path/to/clientkey.pem‘
)
Alternatively you can use RFC-1738 formatted URLs, as long as they are not in conflict with other options:
es = Elasticsearch(
[
‘http://user:secret@localhost:9200/‘,
‘https://user:secret@other_host:443/production‘
],
verify_certs=True
)
Parameters: |
|
---|
bulk
(*args, **kwargs)Perform many index/delete operations in a single API call.
See the bulk()
helper function for a more friendly API.http://www.elastic.co/guide/en/elasticsearch/reference/current/docs-bulk.html
Parameters: |
|
---|
clear_scroll
(*args, **kwargs)Clear the scroll request created by specifying the scroll parameter to search.http://www.elastic.co/guide/en/elasticsearch/reference/current/search-request-scroll.html
Parameters: |
|
---|
count
(*args, **kwargs)Execute a query and get the number of matches for that query.http://www.elastic.co/guide/en/elasticsearch/reference/current/search-count.html
Parameters: |
|
---|
create
(*args, **kwargs)Adds a typed JSON document in a specific index, making it searchable. Behind the scenes this method calls index(..., op_type=’create’)http://www.elastic.co/guide/en/elasticsearch/reference/current/docs-index_.html
Parameters: |
|
---|
delete
(*args, **kwargs)Delete a typed JSON document from a specific index based on its id.http://www.elastic.co/guide/en/elasticsearch/reference/current/docs-delete.html
Parameters: |
|
---|
delete_by_query
(*args, **kwargs)Delete all documents matching a query.https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-delete-by-query.html
Parameters: |
|
---|
delete_script
(*args, **kwargs)Remove a stored script from elasticsearch.http://www.elastic.co/guide/en/elasticsearch/reference/master/modules-scripting.html
Parameters: | id – Script ID |
---|
exists
(*args, **kwargs)Returns a boolean indicating whether or not given document exists in Elasticsearch.http://www.elastic.co/guide/en/elasticsearch/reference/current/docs-get.html
Parameters: |
|
---|
exists_source
(*args, **kwargs)http://www.elastic.co/guide/en/elasticsearch/reference/master/docs-get.html
Parameters: |
|
---|
explain
(*args, **kwargs)The explain api computes a score explanation for a query and a specific document. This can give useful feedback whether a document matches or didn’t match a specific query.http://www.elastic.co/guide/en/elasticsearch/reference/current/search-explain.html
Parameters: |
|
---|
field_caps
(*args, **kwargs)The field capabilities API allows to retrieve the capabilities of fields among multiple indices.http://www.elastic.co/guide/en/elasticsearch/reference/current/search-field-caps.html
Parameters: |
|
---|
get
(*args, **kwargs)Get a typed JSON document from the index based on its id.http://www.elastic.co/guide/en/elasticsearch/reference/current/docs-get.html
Parameters: |
|
---|
get_script
(*args, **kwargs)Retrieve a script from the API.http://www.elastic.co/guide/en/elasticsearch/reference/master/modules-scripting.html
Parameters: | id – Script ID |
---|
get_source
(*args, **kwargs)Get the source of a document by it’s index, type and id.http://www.elastic.co/guide/en/elasticsearch/reference/current/docs-get.html
Parameters: |
|
---|
get_template
(*args, **kwargs)Retrieve a search template.http://www.elastic.co/guide/en/elasticsearch/reference/current/search-template.html
Parameters: | id – Template ID |
---|
index
(*args, **kwargs)Adds or updates a typed JSON document in a specific index, making it searchable.http://www.elastic.co/guide/en/elasticsearch/reference/current/docs-index_.html
Parameters: |
|
---|
info
(*args, **kwargs)Get the basic info from the current cluster. http://www.elastic.co/guide/
mget
(*args, **kwargs)Get multiple documents based on an index, type (optional) and ids.http://www.elastic.co/guide/en/elasticsearch/reference/current/docs-multi-get.html
Parameters: |
|
---|
msearch
(*args, **kwargs)Execute several search requests within the same API.http://www.elastic.co/guide/en/elasticsearch/reference/current/search-multi-search.html
Parameters: |
|
---|
msearch_template
(*args, **kwargs)The /_search/template endpoint allows to use the mustache language to pre render search requests, before they are executed and fill existing templates with template parameters.http://www.elastic.co/guide/en/elasticsearch/reference/current/search-template.html
Parameters: |
|
---|
mtermvectors
(*args, **kwargs)Multi termvectors API allows to get multiple termvectors based on an index, type and id.http://www.elastic.co/guide/en/elasticsearch/reference/current/docs-multi-termvectors.html
Parameters: |
|
---|
ping
(*args, **kwargs)Returns True if the cluster is up, False otherwise. http://www.elastic.co/guide/
put_script
(*args, **kwargs)Create a script in given language with specified ID.http://www.elastic.co/guide/en/elasticsearch/reference/current/modules-scripting.html
Parameters: |
|
---|
put_template
(*args, **kwargs)Create a search template.http://www.elastic.co/guide/en/elasticsearch/reference/current/search-template.html
Parameters: |
|
---|
reindex
(*args, **kwargs)Reindex all documents from one index to another.https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-reindex.html
Parameters: |
|
---|
reindex_rethrottle
(*args, **kwargs)Change the value of requests_per_second
of a running reindex
task.https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-reindex.html
Parameters: |
|
---|
render_search_template
(*args, **kwargs)http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/search-template.html
Parameters: |
|
---|
scroll
(*args, **kwargs)Scroll a search request created by specifying the scroll parameter.http://www.elastic.co/guide/en/elasticsearch/reference/current/search-request-scroll.html
Parameters: |
|
---|
search
(*args, **kwargs)Execute a search query and get back search hits that match the query.http://www.elastic.co/guide/en/elasticsearch/reference/current/search-search.html
Parameters: |
|
---|
search_shards
(*args, **kwargs)The search shards api returns the indices and shards that a search request would be executed against. This can give useful feedback for working out issues or planning optimizations with routing and shard preferences.http://www.elastic.co/guide/en/elasticsearch/reference/current/search-shards.html
Parameters: |
|
---|
search_template
(*args, **kwargs)A query that accepts a query template and a map of key/value pairs to fill in template parameters. http://www.elastic.co/guide/en/elasticsearch/reference/current/search-template.html
Parameters: |
|
---|
termvectors
(*args, **kwargs)Returns information and statistics on terms in the fields of a particular document. The document could be stored in the index or artificially provided by the user (Added in 1.4). Note that for documents stored in the index, this is a near realtime API as the term vectors are not available until the next refresh.http://www.elastic.co/guide/en/elasticsearch/reference/current/docs-termvectors.html
Parameters: |
|
---|
update
(*args, **kwargs)Update a document based on a script or partial data provided.http://www.elastic.co/guide/en/elasticsearch/reference/current/docs-update.html
Parameters: |
|
---|
update_by_query
(*args, **kwargs)Perform an update on all documents matching a query.https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-update-by-query.html
Parameters: |
|
---|
elasticsearch.client.
IndicesClient
(client)analyze
(*args, **kwargs)Perform the analysis process on a text and return the tokens breakdown of the text.http://www.elastic.co/guide/en/elasticsearch/reference/current/indices-analyze.html
Parameters: |
|
---|
clear_cache
(*args, **kwargs)Clear either all caches or specific cached associated with one ore more indices.http://www.elastic.co/guide/en/elasticsearch/reference/current/indices-clearcache.html
Parameters: |
|
---|
close
(*args, **kwargs)Close an index to remove it’s overhead from the cluster. Closed index is blocked for read/write operations.http://www.elastic.co/guide/en/elasticsearch/reference/current/indices-open-close.html
Parameters: |
|
---|
create
(*args, **kwargs)Create an index in Elasticsearch.http://www.elastic.co/guide/en/elasticsearch/reference/current/indices-create-index.html
Parameters: |
|
---|
delete
(*args, **kwargs)Delete an index in Elasticsearchhttp://www.elastic.co/guide/en/elasticsearch/reference/current/indices-delete-index.html
Parameters: |
|
---|
delete_alias
(*args, **kwargs)Delete specific alias.http://www.elastic.co/guide/en/elasticsearch/reference/current/indices-aliases.html
Parameters: |
|
---|
delete_template
(*args, **kwargs)Delete an index template by its name.http://www.elastic.co/guide/en/elasticsearch/reference/current/indices-templates.html
Parameters: |
|
---|
exists
(*args, **kwargs)Return a boolean indicating whether given index exists.http://www.elastic.co/guide/en/elasticsearch/reference/current/indices-exists.html
Parameters: |
|
---|
exists_alias
(*args, **kwargs)Return a boolean indicating whether given alias exists.http://www.elastic.co/guide/en/elasticsearch/reference/current/indices-aliases.html
Parameters: |
|
---|
exists_template
(*args, **kwargs)Return a boolean indicating whether given template exists.http://www.elastic.co/guide/en/elasticsearch/reference/current/indices-templates.html
Parameters: |
|
---|
exists_type
(*args, **kwargs)Check if a type/types exists in an index/indices.http://www.elastic.co/guide/en/elasticsearch/reference/current/indices-types-exists.html
Parameters: |
|
---|
flush
(*args, **kwargs)Explicitly flush one or more indices.http://www.elastic.co/guide/en/elasticsearch/reference/current/indices-flush.html
Parameters: |
|
---|
flush_synced
(*args, **kwargs)Perform a normal flush, then add a generated unique marker (sync_id) to all shards.http://www.elastic.co/guide/en/elasticsearch/reference/current/indices-synced-flush.html
Parameters: |
|
---|
forcemerge
(*args, **kwargs)The force merge API allows to force merging of one or more indices through an API. The merge relates to the number of segments a Lucene index holds within each shard. The force merge operation allows to reduce the number of segments by merging them.
This call will block until the merge is complete. If the http connection is lost, the request will continue in the background, and any new requests will block until the previous force merge is complete. http://www.elastic.co/guide/en/elasticsearch/reference/current/indices-forcemerge.html
Parameters: |
|
---|
get
(*args, **kwargs)The get index API allows to retrieve information about one or more indexes.http://www.elastic.co/guide/en/elasticsearch/reference/current/indices-get-index.html
Parameters: |
|
---|
get_alias
(*args, **kwargs)Retrieve a specified alias.http://www.elastic.co/guide/en/elasticsearch/reference/current/indices-aliases.html
Parameters: |
|
---|
get_field_mapping
(*args, **kwargs)Retrieve mapping definition of a specific field.http://www.elastic.co/guide/en/elasticsearch/reference/current/indices-get-field-mapping.html
Parameters: |
|
---|
get_mapping
(*args, **kwargs)Retrieve mapping definition of index or index/type.http://www.elastic.co/guide/en/elasticsearch/reference/current/indices-get-mapping.html
Parameters: |
|
---|
get_settings
(*args, **kwargs)Retrieve settings for one or more (or all) indices.http://www.elastic.co/guide/en/elasticsearch/reference/current/indices-get-settings.html
Parameters: |
|
---|
get_template
(*args, **kwargs)Retrieve an index template by its name.http://www.elastic.co/guide/en/elasticsearch/reference/current/indices-templates.html
Parameters: |
|
---|
get_upgrade
(*args, **kwargs)Monitor how much of one or more index is upgraded.http://www.elastic.co/guide/en/elasticsearch/reference/current/indices-upgrade.html
Parameters: |
|
---|
open
(*args, **kwargs)Open a closed index to make it available for search.http://www.elastic.co/guide/en/elasticsearch/reference/current/indices-open-close.html
Parameters: |
|
---|
put_alias
(*args, **kwargs)Create an alias for a specific index/indices.http://www.elastic.co/guide/en/elasticsearch/reference/current/indices-aliases.html
Parameters: |
|
---|
put_mapping
(*args, **kwargs)Register specific mapping definition for a specific type.http://www.elastic.co/guide/en/elasticsearch/reference/current/indices-put-mapping.html
Parameters: |
|
---|
put_settings
(*args, **kwargs)Change specific index level settings in real time.http://www.elastic.co/guide/en/elasticsearch/reference/current/indices-update-settings.html
Parameters: |
|
---|
put_template
(*args, **kwargs)Create an index template that will automatically be applied to new indices created.http://www.elastic.co/guide/en/elasticsearch/reference/current/indices-templates.html
Parameters: |
|
---|
recovery
(*args, **kwargs)The indices recovery API provides insight into on-going shard recoveries. Recovery status may be reported for specific indices, or cluster-wide.http://www.elastic.co/guide/en/elasticsearch/reference/current/indices-recovery.html
Parameters: |
|
---|
refresh
(*args, **kwargs)Explicitly refresh one or more index, making all operations performed since the last refresh available for search.http://www.elastic.co/guide/en/elasticsearch/reference/current/indices-refresh.html
Parameters: |
|
---|
rollover
(*args, **kwargs)The rollover index API rolls an alias over to a new index when the existing index is considered to be too large or too old.
The API accepts a single alias name and a list of conditions. The alias must point to a single index only. If the index satisfies the specified conditions then a new index is created and the alias is switched to point to the new alias.http://www.elastic.co/guide/en/elasticsearch/reference/current/indices-rollover-index.html
Parameters: |
|
---|
segments
(*args, **kwargs)Provide low level segments information that a Lucene index (shard level) is built with.http://www.elastic.co/guide/en/elasticsearch/reference/current/indices-segments.html
Parameters: |
|
---|
shard_stores
(*args, **kwargs)Provides store information for shard copies of indices. Store information reports on which nodes shard copies exist, the shard copy version, indicating how recent they are, and any exceptions encountered while opening the shard index or from earlier engine failure.http://www.elastic.co/guide/en/elasticsearch/reference/current/indices-shards-stores.html
Parameters: |
|
---|
shrink
(*args, **kwargs)The shrink index API allows you to shrink an existing index into a new index with fewer primary shards. The number of primary shards in the target index must be a factor of the shards in the source index. For example an index with 8 primary shards can be shrunk into 4, 2 or 1 primary shards or an index with 15 primary shards can be shrunk into 5, 3 or 1. If the number of shards in the index is a prime number it can only be shrunk into a single primary shard. Before shrinking, a (primary or replica) copy of every shard in the index must be present on the same node.http://www.elastic.co/guide/en/elasticsearch/reference/current/indices-shrink-index.html
Parameters: |
|
---|
stats
(*args, **kwargs)Retrieve statistics on different operations happening on an index.http://www.elastic.co/guide/en/elasticsearch/reference/current/indices-stats.html
Parameters: |
|
---|
update_aliases
(*args, **kwargs)Update specified aliases.http://www.elastic.co/guide/en/elasticsearch/reference/current/indices-aliases.html
Parameters: |
|
---|
upgrade
(*args, **kwargs)Upgrade one or more indices to the latest format through an API.http://www.elastic.co/guide/en/elasticsearch/reference/current/indices-upgrade.html
Parameters: |
|
---|
validate_query
(*args, **kwargs)Validate a potentially expensive query without executing it.http://www.elastic.co/guide/en/elasticsearch/reference/current/search-validate.html
Parameters: |
|
---|
elasticsearch.client.
IngestClient
(client)delete_pipeline
(*args, **kwargs)https://www.elastic.co/guide/en/elasticsearch/plugins/current/ingest.html
Parameters: |
|
---|
get_pipeline
(*args, **kwargs)https://www.elastic.co/guide/en/elasticsearch/plugins/current/ingest.html
Parameters: |
|
---|
put_pipeline
(*args, **kwargs)https://www.elastic.co/guide/en/elasticsearch/plugins/current/ingest.html
Parameters: |
|
---|
simulate
(*args, **kwargs)https://www.elastic.co/guide/en/elasticsearch/plugins/current/ingest.html
Parameters: |
|
---|
elasticsearch.client.
ClusterClient
(client)allocation_explain
(*args, **kwargs)http://www.elastic.co/guide/en/elasticsearch/reference/current/cluster-allocation-explain.html
Parameters: |
|
---|
get_settings
(*args, **kwargs)Get cluster settings.http://www.elastic.co/guide/en/elasticsearch/reference/current/cluster-update-settings.html
Parameters: |
|
---|
health
(*args, **kwargs)Get a very simple status on the health of the cluster.http://www.elastic.co/guide/en/elasticsearch/reference/current/cluster-health.html
Parameters: |
|
---|
pending_tasks
(*args, **kwargs)The pending cluster tasks API returns a list of any cluster-level changes (e.g. create index, update mapping, allocate or fail shard) which have not yet been executed.http://www.elastic.co/guide/en/elasticsearch/reference/current/cluster-pending.html
Parameters: |
|
---|
put_settings
(*args, **kwargs)Update cluster wide specific settings.http://www.elastic.co/guide/en/elasticsearch/reference/current/cluster-update-settings.html
Parameters: |
|
---|
reroute
(*args, **kwargs)Explicitly execute a cluster reroute allocation command including specific commands.http://www.elastic.co/guide/en/elasticsearch/reference/current/cluster-reroute.html
Parameters: |
|
---|
state
(*args, **kwargs)Get a comprehensive state information of the whole cluster.http://www.elastic.co/guide/en/elasticsearch/reference/current/cluster-state.html
Parameters: |
|
---|
stats
(*args, **kwargs)The Cluster Stats API allows to retrieve statistics from a cluster wide perspective. The API returns basic index metrics and information about the current nodes that form the cluster.http://www.elastic.co/guide/en/elasticsearch/reference/current/cluster-stats.html
Parameters: |
|
---|
elasticsearch.client.
NodesClient
(client)hot_threads
(*args, **kwargs)An API allowing to get the current hot threads on each node in the cluster.https://www.elastic.co/guide/en/elasticsearch/reference/current/cluster-nodes-hot-threads.html
Parameters: |
|
---|
info
(*args, **kwargs)The cluster nodes info API allows to retrieve one or more (or all) of the cluster nodes information. https://www.elastic.co/guide/en/elasticsearch/reference/current/cluster-nodes-info.html
Parameters: |
|
---|
stats
(*args, **kwargs)The cluster nodes stats API allows to retrieve one or more (or all) of the cluster nodes statistics. https://www.elastic.co/guide/en/elasticsearch/reference/current/cluster-nodes-stats.html
Parameters: |
|
---|
usage
(*args, **kwargs)The cluster nodes usage API allows to retrieve information on the usage of features for each node. http://www.elastic.co/guide/en/elasticsearch/reference/master/cluster-nodes-usage.html
Parameters: |
|
---|
elasticsearch.client.
CatClient
(client)aliases
(*args, **kwargs)https://www.elastic.co/guide/en/elasticsearch/reference/current/cat-alias.html
Parameters: |
|
---|
allocation
(*args, **kwargs)Allocation provides a snapshot of how shards have located around the cluster and the state of disk usage. https://www.elastic.co/guide/en/elasticsearch/reference/current/cat-allocation.html
Parameters: |
|
---|
count
(*args, **kwargs)Count provides quick access to the document count of the entire cluster, or individual indices. https://www.elastic.co/guide/en/elasticsearch/reference/current/cat-count.html
Parameters: |
|
---|
fielddata
(*args, **kwargs)Shows information about currently loaded fielddata on a per-node basis.https://www.elastic.co/guide/en/elasticsearch/reference/current/cat-fielddata.html
Parameters: |
|
---|
health
(*args, **kwargs)health is a terse, one-line representation of the same information from health()
APIhttps://www.elastic.co/guide/en/elasticsearch/reference/current/cat-health.html
Parameters: |
|
---|
help
(*args, **kwargs)A simple help for the cat api.https://www.elastic.co/guide/en/elasticsearch/reference/current/cat.html
Parameters: |
|
---|
indices
(*args, **kwargs)The indices command provides a cross-section of each index.https://www.elastic.co/guide/en/elasticsearch/reference/current/cat-indices.html
Parameters: |
|
---|
master
(*args, **kwargs)Displays the master’s node ID, bound IP address, and node name.https://www.elastic.co/guide/en/elasticsearch/reference/current/cat-master.html
Parameters: |
|
---|
nodeattrs
(*args, **kwargs)https://www.elastic.co/guide/en/elasticsearch/reference/current/cat-nodeattrs.html
Parameters: |
|
---|
nodes
(*args, **kwargs)The nodes command shows the cluster topology.https://www.elastic.co/guide/en/elasticsearch/reference/current/cat-nodes.html
Parameters: |
|
---|
pending_tasks
(*args, **kwargs)pending_tasks provides the same information as the pending_tasks()
API in a convenient tabular format. https://www.elastic.co/guide/en/elasticsearch/reference/current/cat-pending-tasks.html
Parameters: |
|
---|
plugins
(*args, **kwargs)https://www.elastic.co/guide/en/elasticsearch/reference/current/cat-plugins.html
Parameters: |
|
---|
recovery
(*args, **kwargs)recovery is a view of shard replication.https://www.elastic.co/guide/en/elasticsearch/reference/current/cat-recovery.html
Parameters: |
|
---|
repositories
(*args, **kwargs)https://www.elastic.co/guide/en/elasticsearch/reference/current/cat-repositories.html
Parameters: |
|
---|
segments
(*args, **kwargs)The segments command is the detailed view of Lucene segments per index.https://www.elastic.co/guide/en/elasticsearch/reference/current/cat-segments.html
Parameters: |
|
---|
shards
(*args, **kwargs)The shards command is the detailed view of what nodes contain which shards.https://www.elastic.co/guide/en/elasticsearch/reference/current/cat-shards.html
Parameters: |
|
---|
snapshots
(*args, **kwargs)https://www.elastic.co/guide/en/elasticsearch/reference/current/cat-snapshots.html
Parameters: |
|
---|
tasks
(*args, **kwargs)https://www.elastic.co/guide/en/elasticsearch/reference/current/tasks.html
Parameters: |
|
---|
templates
(*args, **kwargs)https://www.elastic.co/guide/en/elasticsearch/reference/current/cat-templates.html
Parameters: |
|
---|
thread_pool
(*args, **kwargs)Get information about thread pools.https://www.elastic.co/guide/en/elasticsearch/reference/current/cat-thread-pool.html
Parameters: |
|
---|
elasticsearch.client.
SnapshotClient
(client)create
(*args, **kwargs)Create a snapshot in repositoryhttp://www.elastic.co/guide/en/elasticsearch/reference/current/modules-snapshots.html
Parameters: |
|
---|
create_repository
(*args, **kwargs)Registers a shared file system repository.http://www.elastic.co/guide/en/elasticsearch/reference/current/modules-snapshots.html
Parameters: |
|
---|
delete
(*args, **kwargs)Deletes a snapshot from a repository.http://www.elastic.co/guide/en/elasticsearch/reference/current/modules-snapshots.html
Parameters: |
|
---|
delete_repository
(*args, **kwargs)Removes a shared file system repository.http://www.elastic.co/guide/en/elasticsearch/reference/current/modules-snapshots.html
Parameters: |
|
---|
get
(*args, **kwargs)Retrieve information about a snapshot.http://www.elastic.co/guide/en/elasticsearch/reference/current/modules-snapshots.html
Parameters: |
|
---|
get_repository
(*args, **kwargs)Return information about registered repositories.http://www.elastic.co/guide/en/elasticsearch/reference/current/modules-snapshots.html
Parameters: |
|
---|
restore
(*args, **kwargs)Restore a snapshot.http://www.elastic.co/guide/en/elasticsearch/reference/current/modules-snapshots.html
Parameters: |
|
---|
status
(*args, **kwargs)Return information about all currently running snapshots. By specifying a repository name, it’s possible to limit the results to a particular repository.http://www.elastic.co/guide/en/elasticsearch/reference/current/modules-snapshots.html
Parameters: |
|
---|
verify_repository
(*args, **kwargs)Returns a list of nodes where repository was successfully verified or an error message if verification process failed.http://www.elastic.co/guide/en/elasticsearch/reference/current/modules-snapshots.html
Parameters: |
|
---|
elasticsearch.client.
TasksClient
(client)cancel
(*args, **kwargs)http://www.elastic.co/guide/en/elasticsearch/reference/current/tasks.html
Parameters: |
|
---|
get
(*args, **kwargs)Retrieve information for a particular task.http://www.elastic.co/guide/en/elasticsearch/reference/current/tasks.html
Parameters: |
|
---|
list
(*args, **kwargs)http://www.elastic.co/guide/en/elasticsearch/reference/current/tasks.html
Parameters: |
|
---|
http://elasticsearch-py.readthedocs.io/en/master/api.html
标签:writing setting tput pytho operation ttl tag view return
原文地址:http://www.cnblogs.com/stevendes1/p/7407424.html