From 15cbfe5980a3139198bb237a4b4840ad12803469 Mon Sep 17 00:00:00 2001 From: Russell Savage Date: Mon, 23 Mar 2015 15:25:45 -0700 Subject: [PATCH 1/4] updating doc links to elastic.co --- .travis.yml | 2 +- CONTRIBUTING.md | 2 +- README.rst | 7 +- elasticsearch/client/__init__.py | 70 +++++++++---------- elasticsearch/client/cat.py | 28 ++++---- elasticsearch/client/cluster.py | 14 ++-- elasticsearch/client/indices.py | 78 +++++++++++----------- elasticsearch/client/nodes.py | 8 +-- elasticsearch/client/snapshot.py | 18 ++--- elasticsearch/connection/pooling.py | 2 +- test_elasticsearch/test_client/__init__.py | 14 ++-- 11 files changed, 121 insertions(+), 122 deletions(-) diff --git a/.travis.yml b/.travis.yml index 9df6f943..4a763483 100644 --- a/.travis.yml +++ b/.travis.yml @@ -15,7 +15,7 @@ env: install: - mkdir /tmp/elasticsearch - - wget -O - http://s3-eu-west-1.amazonaws.com/build-eu.elasticsearch.org/origin/master/nightly/JDK7/elasticsearch-latest-SNAPSHOT.tar.gz | tar xz --directory=/tmp/elasticsearch --strip-components=1 + - wget -O - http://s3-eu-west-1.amazonaws.com/build-eu.elastic.co/origin/master/nightly/JDK7/elasticsearch-latest-SNAPSHOT.tar.gz | tar xz --directory=/tmp/elasticsearch --strip-components=1 - git clone https://github.com/elasticsearch/elasticsearch.git ../elasticsearch - pip install . diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index f0662629..c044c6e6 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -11,7 +11,7 @@ before writing too much code. The process for contributing to any of the Elasticsearch repositories is similar. 1. Please make sure you have signed the [Contributor License - Agreement](http://www.elasticsearch.org/contributor-agreement/). We are not + Agreement](http://www.elastic.co/contributor-agreement/). We are not asking you to assign copyright to us, but to give us the right to distribute your code without restriction. We ask this of all contributors in order to assure our users of the origin and continuing existence of the code. You only diff --git a/README.rst b/README.rst index b0e4b511..c5b42ad6 100644 --- a/README.rst +++ b/README.rst @@ -86,7 +86,7 @@ The client's features include: License ------- -Copyright 2013 Elasticsearch +Copyright 2015 Elasticsearch Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -103,6 +103,5 @@ limitations under the License. Build status ------------ -.. image:: https://secure.travis-ci.org/elasticsearch/elasticsearch-py.png - :target: http://travis-ci.org/#!/elasticsearch/elasticsearch-py - +.. image:: https://secure.travis-ci.org/elastic/elasticsearch-py.png + :target: http://travis-ci.org/#!/elastic/elasticsearch-py diff --git a/elasticsearch/client/__init__.py b/elasticsearch/client/__init__.py index 8ed827f1..5ae18e7e 100644 --- a/elasticsearch/client/__init__.py +++ b/elasticsearch/client/__init__.py @@ -205,7 +205,7 @@ class Elasticsearch(object): """ Adds a typed JSON document in a specific index, making it searchable. Behind the scenes this method calls index(..., op_type='create') - ``_ + ``_ :arg index: The name of the index :arg doc_type: The type of the document @@ -230,7 +230,7 @@ class Elasticsearch(object): def index(self, index, doc_type, body, id=None, params=None): """ Adds or updates a typed JSON document in a specific index, making it searchable. - ``_ + ``_ :arg index: The name of the index :arg doc_type: The type of the document @@ -260,7 +260,7 @@ class Elasticsearch(object): def exists(self, index, id, doc_type='_all', params=None): """ Returns a boolean indicating whether or not given document exists in Elasticsearch. - ``_ + ``_ :arg index: The name of the index :arg id: The document ID @@ -289,7 +289,7 @@ class Elasticsearch(object): def get(self, index, id, doc_type='_all', params=None): """ Get a typed JSON document from the index based on its id. - ``_ + ``_ :arg index: The name of the index :arg id: The document ID @@ -326,7 +326,7 @@ class Elasticsearch(object): def get_source(self, index, id, doc_type='_all', params=None): """ Get the source of a document by it's index, type and id. - ``_ + ``_ :arg index: The name of the index :arg doc_type: The type of the document (uses `_all` by default to @@ -360,7 +360,7 @@ class Elasticsearch(object): def mget(self, body, index=None, doc_type=None, params=None): """ Get multiple documents based on an index, type (optional) and ids. - ``_ + ``_ :arg body: Document identifiers; can be either `docs` (containing full document information) or `ids` (when index and type is provided in the URL. @@ -393,7 +393,7 @@ class Elasticsearch(object): def update(self, index, doc_type, id, body=None, params=None): """ Update a document based on a script or partial data provided. - ``_ + ``_ :arg index: The name of the index :arg doc_type: The type of the document @@ -433,7 +433,7 @@ class Elasticsearch(object): def search(self, index=None, doc_type=None, body=None, params=None): """ Execute a search query and get back search hits that match the query. - ``_ + ``_ :arg index: A comma-separated list of index names to search; use `_all` or empty string to perform the operation on all indices @@ -504,7 +504,7 @@ class Elasticsearch(object): 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. - ``_ + ``_ :arg index: The name of the index :arg doc_type: The type of the document @@ -531,7 +531,7 @@ class Elasticsearch(object): """ A query that accepts a query template and a map of key/value pairs to fill in template parameters. - ``_ + ``_ :arg index: A comma-separated list of index names to search; use `_all` or empty string to perform the operation on all indices @@ -565,7 +565,7 @@ class Elasticsearch(object): 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. - ``_ + ``_ :arg index: The name of the index :arg doc_type: The type of the document @@ -606,7 +606,7 @@ class Elasticsearch(object): def scroll(self, scroll_id, params=None): """ Scroll a search request created by specifying the scroll parameter. - ``_ + ``_ :arg scroll_id: The scroll ID :arg scroll: Specify how long a consistent view of the index should be @@ -621,7 +621,7 @@ class Elasticsearch(object): """ Clear the scroll request created by specifying the scroll parameter to search. - ``_ + ``_ :arg scroll_id: The scroll ID or a list of scroll IDs :arg body: A comma-separated list of scroll IDs to clear if none was @@ -637,7 +637,7 @@ class Elasticsearch(object): def delete(self, index, doc_type, id, params=None): """ Delete a typed JSON document from a specific index based on its id. - ``_ + ``_ :arg index: The name of the index :arg doc_type: The type of the document @@ -662,7 +662,7 @@ class Elasticsearch(object): def count(self, index=None, doc_type=None, body=None, params=None): """ Execute a query and get the number of matches for that query. - ``_ + ``_ :arg index: A comma-separated list of indices to restrict the results :arg doc_type: A comma-separated list of types to restrict the results @@ -689,7 +689,7 @@ class Elasticsearch(object): def bulk(self, body, index=None, doc_type=None, params=None): """ Perform many index/delete operations in a single API call. - ``_ + ``_ See the :func:`~elasticsearch.helpers.bulk` helper function for a more friendly API. @@ -715,7 +715,7 @@ class Elasticsearch(object): def msearch(self, body, index=None, doc_type=None, params=None): """ Execute several search requests within the same API. - ``_ + ``_ :arg body: The request definitions (metadata-search request definition pairs), as either a newline separated string, or a sequence of @@ -736,7 +736,7 @@ class Elasticsearch(object): def delete_by_query(self, index, doc_type=None, body=None, params=None): """ Delete documents from one or more indices and one or more types based on a query. - ``_ + ``_ :arg index: A comma-separated list of indices to restrict the operation; use `_all` to perform the operation on all indices @@ -775,7 +775,7 @@ class Elasticsearch(object): """ The suggest feature suggests similar looking terms based on a provided text by using a suggester. - ``_ + ``_ :arg index: A comma-separated list of index names to restrict the operation; use `_all` or empty string to perform the operation on all indices @@ -806,7 +806,7 @@ class Elasticsearch(object): The percolator allows to register queries against an index, and then send percolate requests which include a doc, and getting back the queries that match on that doc out of the set of registered queries. - ``_ + ``_ :arg index: The index of the document being percolated. :arg doc_type: The type of the document being percolated. @@ -847,7 +847,7 @@ class Elasticsearch(object): The percolator allows to register queries against an index, and then send percolate requests which include a doc, and getting back the queries that match on that doc out of the set of registered queries. - ``_ + ``_ :arg index: The index of the document being count percolated to use as default @@ -877,7 +877,7 @@ class Elasticsearch(object): The percolator allows to register queries against an index, and then send percolate requests which include a doc, and getting back the queries that match on that doc out of the set of registered queries. - ``_ + ``_ :arg index: The index of the document being count percolated. :arg doc_type: The type of the document being count percolated. @@ -919,7 +919,7 @@ class Elasticsearch(object): def mlt(self, index, doc_type, id, body=None, params=None): """ Get documents that are "like" a specified document. - ``_ + ``_ :arg index: The name of the index :arg doc_type: The type of the document (use `_all` to fetch the first @@ -970,7 +970,7 @@ class Elasticsearch(object): 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. - `` + `` :arg index: The index in which the document resides. :arg doc_type: The type of the document. @@ -1019,7 +1019,7 @@ class Elasticsearch(object): """ Multi termvectors API allows to get multiple termvectors based on an index, type and id. - ``_ + ``_ :arg index: The index in which the document resides. :arg doc_type: The type of the document. @@ -1065,7 +1065,7 @@ class Elasticsearch(object): """ The benchmark API provides a standard mechanism for submitting queries and measuring their performance relative to one another. - ``_ + ``_ :arg index: A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices @@ -1082,7 +1082,7 @@ class Elasticsearch(object): def abort_benchmark(self, name=None, params=None): """ Aborts a running benchmark. - ``_ + ``_ :arg name: A benchmark name """ @@ -1094,7 +1094,7 @@ class Elasticsearch(object): def list_benchmarks(self, index=None, doc_type=None, params=None): """ View the progress of long-running benchmarks. - ``_ + ``_ :arg index: A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices @@ -1108,7 +1108,7 @@ class Elasticsearch(object): def put_script(self, lang, id, body, params=None): """ Create a script in given language with specified ID. - ``_ + ``_ :arg lang: Script language :arg id: Script ID @@ -1128,7 +1128,7 @@ class Elasticsearch(object): def get_script(self, lang, id, params=None): """ Retrieve a script from the API. - ``_ + ``_ :arg lang: Script language :arg id: Script ID @@ -1146,7 +1146,7 @@ class Elasticsearch(object): def delete_script(self, lang, id, params=None): """ Remove a stored script from elasticsearch. - ``_ + ``_ :arg lang: Script language :arg id: Script ID @@ -1164,7 +1164,7 @@ class Elasticsearch(object): def put_template(self, id, body, params=None): """ Create a search template. - ``_ + ``_ :arg id: Template ID :arg body: The document @@ -1183,7 +1183,7 @@ class Elasticsearch(object): def get_template(self, id, params=None): """ Retrieve a search template. - ``_ + ``_ :arg id: Template ID :arg version: Explicit version number for concurrency control @@ -1199,7 +1199,7 @@ class Elasticsearch(object): def delete_template(self, id=None, params=None): """ Delete a search template. - ``_ + ``_ :arg id: Template ID :arg version: Explicit version number for concurrency control @@ -1213,7 +1213,7 @@ class Elasticsearch(object): 'min_score', 'preference', 'routing', 'source') def search_exists(self, index=None, doc_type=None, body=None, params=None): """ - ``_ + ``_ :arg index: A comma-separated list of indices to restrict the results :arg doc_type: A comma-separated list of types to restrict the results diff --git a/elasticsearch/client/cat.py b/elasticsearch/client/cat.py index a1982aa9..3e487a14 100644 --- a/elasticsearch/client/cat.py +++ b/elasticsearch/client/cat.py @@ -4,7 +4,7 @@ class CatClient(NamespacedClient): @query_params('h', 'help', 'local', 'master_timeout', 'v') def aliases(self, name=None, params=None): """ - ``_ + ``_ :arg name: A comma-separated list of alias names to return :arg h: Comma-separated list of column names to display @@ -24,7 +24,7 @@ class CatClient(NamespacedClient): """ Allocation provides a snapshot of how shards have located around the cluster and the state of disk usage. - ``_ + ``_ :arg node_id: A comma-separated list of node IDs or names to limit the returned information @@ -46,7 +46,7 @@ class CatClient(NamespacedClient): """ Count provides quick access to the document count of the entire cluster, or individual indices. - ``_ + ``_ :arg index: A comma-separated list of index names to limit the returned information @@ -67,7 +67,7 @@ class CatClient(NamespacedClient): """ health is a terse, one-line representation of the same information from :meth:`~elasticsearch.client.cluster.ClusterClient.health` API - ``_ + ``_ :arg h: Comma-separated list of column names to display :arg help: Return help information, default False @@ -86,7 +86,7 @@ class CatClient(NamespacedClient): def help(self, params=None): """ A simple help for the cat api. - ``_ + ``_ :arg help: Return help information, default False """ @@ -97,7 +97,7 @@ class CatClient(NamespacedClient): def indices(self, index=None, params=None): """ The indices command provides a cross-section of each index. - ``_ + ``_ :arg index: A comma-separated list of index names to limit the returned information @@ -120,7 +120,7 @@ class CatClient(NamespacedClient): def master(self, params=None): """ Displays the master's node ID, bound IP address, and node name. - ``_ + ``_ :arg h: Comma-separated list of column names to display :arg help: Return help information, default False @@ -138,7 +138,7 @@ class CatClient(NamespacedClient): def nodes(self, params=None): """ The nodes command shows the cluster topology. - ``_ + ``_ :arg h: Comma-separated list of column names to display :arg help: Return help information, default False @@ -156,7 +156,7 @@ class CatClient(NamespacedClient): def recovery(self, index=None, params=None): """ recovery is a view of shard replication. - ``_ + ``_ :arg index: A comma-separated list of index names to limit the returned information @@ -177,7 +177,7 @@ class CatClient(NamespacedClient): def shards(self, index=None, params=None): """ The shards command is the detailed view of what nodes contain which shards. - ``_ + ``_ :arg index: A comma-separated list of index names to limit the returned information @@ -218,7 +218,7 @@ class CatClient(NamespacedClient): pending_tasks provides the same information as the :meth:`~elasticsearch.client.cluster.ClusterClient.pending_tasks` API in a convenient tabular format. - ``_ + ``_ :arg h: Comma-separated list of column names to display :arg help: Return help information, default False @@ -236,7 +236,7 @@ class CatClient(NamespacedClient): def thread_pool(self, params=None): """ Get information about thread pools. - ``_ + ``_ :arg full_id: Enables displaying the complete node ids (default: 'false') :arg h: Comma-separated list of column names to display @@ -257,7 +257,7 @@ class CatClient(NamespacedClient): def fielddata(self, fields=None, params=None): """ Shows information about currently loaded fielddata on a per-node basis. - ``_ + ``_ :arg fields: A comma-separated list of fields to return the fielddata size @@ -280,7 +280,7 @@ class CatClient(NamespacedClient): @query_params('h', 'help', 'local', 'master_timeout', 'v') def plugins(self, params=None): """ - ``_ + ``_ :arg h: Comma-separated list of column names to display :arg help: Return help information, default False diff --git a/elasticsearch/client/cluster.py b/elasticsearch/client/cluster.py index dd7a74d5..c51edba2 100644 --- a/elasticsearch/client/cluster.py +++ b/elasticsearch/client/cluster.py @@ -7,7 +7,7 @@ class ClusterClient(NamespacedClient): def health(self, index=None, params=None): """ Get a very simple status on the health of the cluster. - ``_ + ``_ :arg index: Limit the information returned to a specific index :arg level: Specify the level of detail for returned information, default u'cluster' @@ -29,7 +29,7 @@ class ClusterClient(NamespacedClient): 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. - ``_ + ``_ :arg local: Return local information, do not retrieve the state from master node (default: false) :arg master_timeout: Specify timeout for connection to master @@ -43,7 +43,7 @@ class ClusterClient(NamespacedClient): def state(self, metric=None, index=None, params=None): """ Get a comprehensive state information of the whole cluster. - ``_ + ``_ :arg metric: Limit the information returned to the specified metrics. Possible values: "_all", "blocks", "index_templates", "metadata", @@ -73,7 +73,7 @@ class ClusterClient(NamespacedClient): 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. - ``_ + ``_ :arg node_id: A comma-separated list of node IDs or names to limit the returned information; use `_local` to return information from the node @@ -92,7 +92,7 @@ class ClusterClient(NamespacedClient): def reroute(self, body=None, params=None): """ Explicitly execute a cluster reroute allocation command including specific commands. - ``_ + ``_ :arg body: The definition of `commands` to perform (`move`, `cancel`, `allocate`) :arg dry_run: Simulate the operation only and return the resulting state @@ -110,7 +110,7 @@ class ClusterClient(NamespacedClient): def get_settings(self, params=None): """ Get cluster settings. - ``_ + ``_ :arg flat_settings: Return settings in flat format (default: false) :arg master_timeout: Explicit operation timeout for connection to master node @@ -123,7 +123,7 @@ class ClusterClient(NamespacedClient): def put_settings(self, body, params=None): """ Update cluster wide specific settings. - ``_ + ``_ :arg body: The settings to be updated. Can be either `transient` or `persistent` (survives cluster restart). diff --git a/elasticsearch/client/indices.py b/elasticsearch/client/indices.py index d4cf8f94..17531cb4 100644 --- a/elasticsearch/client/indices.py +++ b/elasticsearch/client/indices.py @@ -7,7 +7,7 @@ class IndicesClient(NamespacedClient): def analyze(self, index=None, body=None, params=None): """ Perform the analysis process on a text and return the tokens breakdown of the text. - ``_ + ``_ :arg index: The name of the index to scope the operation :arg body: The text on which the analysis should be performed @@ -34,7 +34,7 @@ class IndicesClient(NamespacedClient): """ Explicitly refresh one or more index, making all operations performed since the last refresh available for search. - ``_ + ``_ :arg index: A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices @@ -58,7 +58,7 @@ class IndicesClient(NamespacedClient): def flush(self, index=None, params=None): """ Explicitly flush one or more indices. - ``_ + ``_ :arg index: A comma-separated list of index names; use `_all` or empty string for all indices @@ -84,7 +84,7 @@ class IndicesClient(NamespacedClient): def create(self, index, body=None, params=None): """ Create an index in Elasticsearch. - ``_ + ``_ :arg index: The name of the index :arg body: The configuration for the index (`settings` and `mappings`) @@ -102,7 +102,7 @@ class IndicesClient(NamespacedClient): def get(self, index, feature=None, params=None): """ The get index API allows to retrieve information about one or more indexes. - ``_ + ``_ :arg index: A comma-separated list of index names :arg feature: A comma-separated list of features @@ -125,7 +125,7 @@ class IndicesClient(NamespacedClient): def open(self, index, params=None): """ Open a closed index to make it available for search. - ``_ + ``_ :arg index: The name of the index :arg master_timeout: Specify timeout for connection to master @@ -150,7 +150,7 @@ class IndicesClient(NamespacedClient): """ Close an index to remove it's overhead from the cluster. Closed index is blocked for read/write operations. - ``_ + ``_ :arg index: A comma-separated list of indices to close; use `_all` or '*' to close all indices @@ -174,7 +174,7 @@ class IndicesClient(NamespacedClient): def delete(self, index, params=None): """ Delete an index in Elasticsearch - ``_ + ``_ :arg index: A comma-separated list of indices to delete; use `_all` or '*' to delete all indices @@ -192,7 +192,7 @@ class IndicesClient(NamespacedClient): def exists(self, index, params=None): """ Return a boolean indicating whether given index exists. - ``_ + ``_ :arg index: A list of indices to check :arg allow_no_indices: Whether to ignore if a wildcard indices @@ -218,7 +218,7 @@ class IndicesClient(NamespacedClient): def exists_type(self, index, doc_type, params=None): """ Check if a type/types exists in an index/indices. - ``_ + ``_ :arg index: A comma-separated list of index names; use `_all` to check the types across all indices @@ -249,7 +249,7 @@ class IndicesClient(NamespacedClient): def put_mapping(self, doc_type, body, index=None, params=None): """ Register specific mapping definition for a specific type. - ``_ + ``_ :arg index: A comma-separated list of index names the mapping should be added to (supports wildcards); use `_all` or omit to add the @@ -280,7 +280,7 @@ class IndicesClient(NamespacedClient): def get_mapping(self, index=None, doc_type=None, params=None): """ Retrieve mapping definition of index or index/type. - ``_ + ``_ :arg index: A comma-separated list of index names; use `_all` or empty string for all indices @@ -304,7 +304,7 @@ class IndicesClient(NamespacedClient): def get_field_mapping(self, field, index=None, doc_type=None, params=None): """ Retrieve mapping definition of a specific field. - ``_ + ``_ :arg index: A comma-separated list of index names; use `_all` or empty string for all indices @@ -331,7 +331,7 @@ class IndicesClient(NamespacedClient): def delete_mapping(self, index, doc_type, params=None): """ Delete a mapping (type) along with its data. - ``_ + ``_ :arg index: A comma-separated list of index names (supports wildcard); use `_all` for all indices @@ -351,7 +351,7 @@ class IndicesClient(NamespacedClient): def put_alias(self, name, index, body=None, params=None): """ Create an alias for a specific index/indices. - ``_ + ``_ :arg index: A comma-separated list of index names the alias should point to (supports wildcards); use `_all` or omit to perform the @@ -373,7 +373,7 @@ class IndicesClient(NamespacedClient): def exists_alias(self, name, index=None, params=None): """ Return a boolean indicating whether given alias exists. - ``_ + ``_ :arg name: A comma-separated list of alias names to return :arg index: A comma-separated list of index names to filter aliases @@ -400,7 +400,7 @@ class IndicesClient(NamespacedClient): def get_alias(self, index=None, name=None, params=None): """ Retrieve a specified alias. - ``_ + ``_ :arg name: A comma-separated list of alias names to return :arg index: A comma-separated list of index names to filter aliases @@ -424,7 +424,7 @@ class IndicesClient(NamespacedClient): def get_aliases(self, index=None, name=None, params=None): """ Retrieve specified aliases - ``_ + ``_ :arg index: A comma-separated list of index names to filter aliases :arg name: A comma-separated list of alias names to filter @@ -440,7 +440,7 @@ class IndicesClient(NamespacedClient): def update_aliases(self, body, params=None): """ Update specified aliases. - ``_ + ``_ :arg body: The definition of `actions` to perform :arg master_timeout: Specify timeout for connection to master @@ -456,7 +456,7 @@ class IndicesClient(NamespacedClient): def delete_alias(self, index, name, params=None): """ Delete specific alias. - ``_ + ``_ :arg index: A comma-separated list of index names (supports wildcards); use `_all` for all indices @@ -477,7 +477,7 @@ class IndicesClient(NamespacedClient): """ Create an index template that will automatically be applied to new indices created. - ``_ + ``_ :arg name: The name of the template :arg body: The template definition @@ -500,7 +500,7 @@ class IndicesClient(NamespacedClient): def exists_template(self, name, params=None): """ Return a boolean indicating whether given template exists. - ``_ + ``_ :arg name: The name of the template :arg local: Return local information, do not retrieve the state from @@ -521,7 +521,7 @@ class IndicesClient(NamespacedClient): def get_template(self, name=None, params=None): """ Retrieve an index template by its name. - ``_ + ``_ :arg name: The name of the template :arg flat_settings: Return settings in flat format (default: false) @@ -538,7 +538,7 @@ class IndicesClient(NamespacedClient): def delete_template(self, name, params=None): """ Delete an index template by its name. - ``_ + ``_ :arg name: The name of the template :arg master_timeout: Specify timeout for connection to master @@ -555,7 +555,7 @@ class IndicesClient(NamespacedClient): def get_settings(self, index=None, name=None, params=None): """ Retrieve settings for one or more (or all) indices. - ``_ + ``_ :arg index: A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices @@ -579,7 +579,7 @@ class IndicesClient(NamespacedClient): def put_settings(self, body, index=None, params=None): """ Change specific index level settings in real time. - ``_ + ``_ :arg body: The index settings to be updated :arg index: A comma-separated list of index names; use `_all` or empty @@ -606,7 +606,7 @@ class IndicesClient(NamespacedClient): """ Create an index warmer to run registered search requests to warm up the index before it is available for search. - ``_ + ``_ :arg name: The name of the warmer :arg body: The search request definition for the warmer (query, filters, @@ -641,7 +641,7 @@ class IndicesClient(NamespacedClient): def get_warmer(self, index=None, doc_type=None, name=None, params=None): """ Retreieve an index warmer. - ``_ + ``_ :arg index: A comma-separated list of index names to restrict the operation; use `_all` to perform the operation on all indices @@ -666,7 +666,7 @@ class IndicesClient(NamespacedClient): def delete_warmer(self, index, name, params=None): """ Delete an index warmer. - ``_ + ``_ :arg index: A comma-separated list of index names to delete warmers from (supports wildcards); use `_all` to perform the operation on all indices. @@ -686,7 +686,7 @@ class IndicesClient(NamespacedClient): def status(self, index=None, params=None): """ Get a comprehensive status information of one or more indices. - ``_ + ``_ :arg index: A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices @@ -714,7 +714,7 @@ class IndicesClient(NamespacedClient): def stats(self, index=None, metric=None, params=None): """ Retrieve statistics on different operations happening on an index. - ``_ + ``_ :arg index: A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices @@ -753,7 +753,7 @@ class IndicesClient(NamespacedClient): def segments(self, index=None, params=None): """ Provide low level segments information that a Lucene index (shard level) is built with. - ``_ + ``_ :arg index: A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices @@ -778,7 +778,7 @@ class IndicesClient(NamespacedClient): def optimize(self, index=None, params=None): """ Explicitly optimize one or more indices through an API. - ``_ + ``_ :arg index: A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices @@ -810,7 +810,7 @@ class IndicesClient(NamespacedClient): def validate_query(self, index=None, doc_type=None, body=None, params=None): """ Validate a potentially expensive query without executing it. - ``_ + ``_ :arg index: A comma-separated list of index names to restrict the operation; use `_all` or empty string to perform the operation on all indices @@ -842,7 +842,7 @@ class IndicesClient(NamespacedClient): def clear_cache(self, index=None, params=None): """ Clear either all caches or specific cached associated with one ore more indices. - ``_ + ``_ :arg index: A comma-separated list of index name to limit the operation :arg field_data: Clear field data @@ -876,7 +876,7 @@ class IndicesClient(NamespacedClient): The indices recovery API provides insight into on-going shard recoveries. Recovery status may be reported for specific indices, or cluster-wide. - ``_ + ``_ :arg index: A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices @@ -896,7 +896,7 @@ class IndicesClient(NamespacedClient): def snapshot_index(self, index=None, params=None): """ Explicitly perform a snapshot through the gateway of one or more indices (backup them). - ``_ + ``_ :arg index: A comma-separated list of index names; use `_all` or empty string for all indices @@ -919,7 +919,7 @@ class IndicesClient(NamespacedClient): def upgrade(self, index=None, params=None): """ Upgrade one or more indices to the latest format through an API. - ``_ + ``_ :arg index: A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices @@ -942,7 +942,7 @@ class IndicesClient(NamespacedClient): def get_upgrade(self, index=None, params=None): """ Monitor how much of one or more index is upgraded. - ``_ + ``_ :arg index: A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices diff --git a/elasticsearch/client/nodes.py b/elasticsearch/client/nodes.py index 77474d62..e0c777c6 100644 --- a/elasticsearch/client/nodes.py +++ b/elasticsearch/client/nodes.py @@ -6,7 +6,7 @@ class NodesClient(NamespacedClient): """ The cluster nodes info API allows to retrieve one or more (or all) of the cluster nodes information. - ``_ + ``_ :arg node_id: A comma-separated list of node IDs or names to limit the returned information; use `_local` to return information from the @@ -28,7 +28,7 @@ class NodesClient(NamespacedClient): """ The nodes shutdown API allows to shutdown one or more (or all) nodes in the cluster. - ``_ + ``_ :arg node_id: A comma-separated list of node IDs or names to perform the operation on; use `_local` to perform the operation on the node @@ -46,7 +46,7 @@ class NodesClient(NamespacedClient): """ The cluster nodes stats API allows to retrieve one or more (or all) of the cluster nodes statistics. - ``_ + ``_ :arg node_id: A comma-separated list of node IDs or names to limit the returned information; use `_local` to return information from the @@ -84,7 +84,7 @@ class NodesClient(NamespacedClient): def hot_threads(self, node_id=None, params=None): """ An API allowing to get the current hot threads on each node in the cluster. - ``_ + ``_ :arg node_id: A comma-separated list of node IDs or names to limit the returned information; use `_local` to return information from the diff --git a/elasticsearch/client/snapshot.py b/elasticsearch/client/snapshot.py index 7c2b8155..477264a3 100644 --- a/elasticsearch/client/snapshot.py +++ b/elasticsearch/client/snapshot.py @@ -5,7 +5,7 @@ class SnapshotClient(NamespacedClient): def create(self, repository, snapshot, body=None, params=None): """ Create a snapshot in repository - ``_ + ``_ :arg repository: A repository name :arg snapshot: A snapshot name @@ -26,7 +26,7 @@ class SnapshotClient(NamespacedClient): def delete(self, repository, snapshot, params=None): """ Deletes a snapshot from a repository. - ``_ + ``_ :arg repository: A repository name :arg snapshot: A snapshot name @@ -44,7 +44,7 @@ class SnapshotClient(NamespacedClient): def get(self, repository, snapshot, params=None): """ Retrieve information about a snapshot. - ``_ + ``_ :arg repository: A comma-separated list of repository names :arg snapshot: A comma-separated list of snapshot names @@ -62,7 +62,7 @@ class SnapshotClient(NamespacedClient): def delete_repository(self, repository, params=None): """ Removes a shared file system repository. - ``_ + ``_ :arg repository: A comma-separated list of repository names :arg master_timeout: Explicit operation timeout for connection to master @@ -79,7 +79,7 @@ class SnapshotClient(NamespacedClient): def get_repository(self, repository=None, params=None): """ Return information about registered repositories. - ``_ + ``_ :arg repository: A comma-separated list of repository names :arg master_timeout: Explicit operation timeout for connection to master @@ -95,7 +95,7 @@ class SnapshotClient(NamespacedClient): def create_repository(self, repository, body, params=None): """ Registers a shared file system repository. - ``_ + ``_ :arg repository: A repository name :arg body: The repository definition @@ -114,7 +114,7 @@ class SnapshotClient(NamespacedClient): def restore(self, repository, snapshot, body=None, params=None): """ Restore a snapshot. - ``_ + ``_ :arg repository: A repository name :arg snapshot: A snapshot name @@ -137,7 +137,7 @@ class SnapshotClient(NamespacedClient): Return information about all currently running snapshots. By specifying a repository name, it's possible to limit the results to a particular repository. - ``_ + ``_ :arg repository: A repository name :arg snapshot: A comma-separated list of snapshot names @@ -153,7 +153,7 @@ class SnapshotClient(NamespacedClient): """ Returns a list of nodes where repository was successfully verified or an error message if verification process failed. - ``_ + ``_ :arg repository: A repository name :arg master_timeout: Explicit operation timeout for connection to master diff --git a/elasticsearch/connection/pooling.py b/elasticsearch/connection/pooling.py index 284d062f..764046e4 100644 --- a/elasticsearch/connection/pooling.py +++ b/elasticsearch/connection/pooling.py @@ -17,4 +17,4 @@ class PoolingConnection(Connection): return self._make_connection() def _release_connection(self, con): - self._free_connections.put(con) \ No newline at end of file + self._free_connections.put(con) diff --git a/test_elasticsearch/test_client/__init__.py b/test_elasticsearch/test_client/__init__.py index 71bd04d0..81541b8f 100644 --- a/test_elasticsearch/test_client/__init__.py +++ b/test_elasticsearch/test_client/__init__.py @@ -9,19 +9,19 @@ class TestNormalizeHosts(TestCase): self.assertEquals([{}], _normalize_hosts(None)) def test_strings_are_used_as_hostnames(self): - self.assertEquals([{"host": "elasticsearch.org"}], _normalize_hosts(["elasticsearch.org"])) + self.assertEquals([{"host": "elastic.co"}], _normalize_hosts(["elastic.co"])) def test_strings_are_parsed_for_port_and_user(self): self.assertEquals( - [{"host": "elasticsearch.org", "port": 42}, {"host": "elasticsearch.com", "http_auth": "user:secret"}], - _normalize_hosts(["elasticsearch.org:42", "user:secret@elasticsearch.com"]) + [{"host": "elastic.co", "port": 42}, {"host": "elasticsearch.com", "http_auth": "user:secret"}], + _normalize_hosts(["elastic.co:42", "user:secret@elasticsearch.com"]) ) def test_strings_are_parsed_for_scheme(self): self.assertEquals( [ { - "host": "elasticsearch.org", + "host": "elastic.co", "port": 42, "use_ssl": True, 'scheme': 'http' @@ -35,7 +35,7 @@ class TestNormalizeHosts(TestCase): 'url_prefix': '/prefix' } ], - _normalize_hosts(["https://elasticsearch.org:42", "https://user:secret@elasticsearch.com/prefix"]) + _normalize_hosts(["https://elastic.co:42", "https://user:secret@elasticsearch.com/prefix"]) ) def test_dicts_are_left_unchanged(self): @@ -43,8 +43,8 @@ class TestNormalizeHosts(TestCase): def test_single_string_is_wrapped_in_list(self): self.assertEquals( - [{"host": "elasticsearch.org"}], - _normalize_hosts("elasticsearch.org") + [{"host": "elastic.co"}], + _normalize_hosts("elastic.co") ) From e58e21b13bd8ea1ec5f1e13f48b4ba9e438c560a Mon Sep 17 00:00:00 2001 From: Russell Savage Date: Mon, 23 Mar 2015 15:28:24 -0700 Subject: [PATCH 2/4] reverting bucket link to elasticsearch.org --- .travis.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index 4a763483..ec2c6a7e 100644 --- a/.travis.yml +++ b/.travis.yml @@ -15,7 +15,7 @@ env: install: - mkdir /tmp/elasticsearch - - wget -O - http://s3-eu-west-1.amazonaws.com/build-eu.elastic.co/origin/master/nightly/JDK7/elasticsearch-latest-SNAPSHOT.tar.gz | tar xz --directory=/tmp/elasticsearch --strip-components=1 + - wget -O - http://s3-eu-west-1.amazonaws.com/build-eu.elasticsearch.org/origin/master/nightly/JDK7/elasticsearch-latest-SNAPSHOT.tar.gz | tar xz --directory=/tmp/elasticsearch --strip-components=1 - git clone https://github.com/elasticsearch/elasticsearch.git ../elasticsearch - pip install . @@ -24,4 +24,3 @@ before_script: script: - python setup.py test - From f5b73d912d99d11e4e03503dd48aaa9f0cf620c1 Mon Sep 17 00:00:00 2001 From: Russell Savage Date: Mon, 23 Mar 2015 15:36:21 -0700 Subject: [PATCH 3/4] updating test cases to use elastic.co --- test_elasticsearch/test_client/__init__.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/test_elasticsearch/test_client/__init__.py b/test_elasticsearch/test_client/__init__.py index 81541b8f..dacf8e42 100644 --- a/test_elasticsearch/test_client/__init__.py +++ b/test_elasticsearch/test_client/__init__.py @@ -13,8 +13,8 @@ class TestNormalizeHosts(TestCase): def test_strings_are_parsed_for_port_and_user(self): self.assertEquals( - [{"host": "elastic.co", "port": 42}, {"host": "elasticsearch.com", "http_auth": "user:secret"}], - _normalize_hosts(["elastic.co:42", "user:secret@elasticsearch.com"]) + [{"host": "elastic.co", "port": 42}, {"host": "elastic.co", "http_auth": "user:secret"}], + _normalize_hosts(["elastic.co:42", "user:secret@elastic.co"]) ) def test_strings_are_parsed_for_scheme(self): @@ -23,11 +23,11 @@ class TestNormalizeHosts(TestCase): { "host": "elastic.co", "port": 42, - "use_ssl": True, + "use_ssl": True, 'scheme': 'http' }, { - "host": "elasticsearch.com", + "host": "elastic.co", "http_auth": "user:secret", "use_ssl": True, "port": 443, @@ -35,7 +35,7 @@ class TestNormalizeHosts(TestCase): 'url_prefix': '/prefix' } ], - _normalize_hosts(["https://elastic.co:42", "https://user:secret@elasticsearch.com/prefix"]) + _normalize_hosts(["https://elastic.co:42", "https://user:secret@elastic.co/prefix"]) ) def test_dicts_are_left_unchanged(self): From e5f867507c96c59dcf2b8576eb5216e3e67516a9 Mon Sep 17 00:00:00 2001 From: Russell Savage Date: Mon, 23 Mar 2015 15:50:05 -0700 Subject: [PATCH 4/4] updating pylibmc version --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index 3faf12ef..4f76419b 100644 --- a/setup.py +++ b/setup.py @@ -32,7 +32,7 @@ if sys.version_info[0] == 2: # only require thrift if we are going to use it if os.environ.get('TEST_ES_CONNECTION', None) == 'ThriftConnection': tests_require.append('thrift==0.9.1') - tests_require.append('pylibmc==1.2.3') + tests_require.append('pylibmc==1.4.1') setup( name = 'elasticsearch',