Reference - Endpoints

This is a complete list of namespaces and their associated endpoints.

This is auto-generated documentation

Elasticsearch\Client

Class Client

Methods

The class defines the following methods:

info()

  1. /*
  2. */
  3. $params = [
  4. // ...
  5. ];
  6. $client = ClientBuilder::create()->build();
  7. $response = $client->info($params);

ping()

  1. /*
  2. */
  3. $params = [
  4. // ...
  5. ];
  6. $client = ClientBuilder::create()->build();
  7. $response = $client->ping($params);

get()

  1. /*
  2. $params['id'] = (string) The document ID (Required)
  3. ['index'] = (string) The name of the index (Required)
  4. ['type'] = (string) The type of the document (use `_all` to fetch the first document matching the ID across all types) (Required)
  5. ['ignore_missing'] = ??
  6. ['fields'] = (list) A comma-separated list of fields to return in the response
  7. ['parent'] = (string) The ID of the parent document
  8. ['preference'] = (string) Specify the node or shard the operation should be performed on (default: random)
  9. ['realtime'] = (boolean) Specify whether to perform the operation in realtime or search mode
  10. ['refresh'] = (boolean) Refresh the shard containing the document before performing the operation
  11. ['routing'] = (string) Specific routing value
  12. ['_source'] = (list) True or false to return the _source field or not, or a list of fields to return
  13. ['_source_exclude'] = (list) A list of fields to exclude from the returned _source field
  14. ['_source_include'] = (list) A list of fields to extract and return from the _source field
  15. ['body'] = (array) Request body
  16. */
  17. $params = [
  18. // ...
  19. ];
  20. $client = ClientBuilder::create()->build();
  21. $response = $client->get($params);

getSource()

  1. /*
  2. $params['id'] = (string) The document ID (Required)
  3. ['index'] = (string) The name of the index (Required)
  4. ['type'] = (string) The type of the document (use `_all` to fetch the first document matching the ID across all types) (Required)
  5. ['ignore_missing'] = ??
  6. ['parent'] = (string) The ID of the parent document
  7. ['preference'] = (string) Specify the node or shard the operation should be performed on (default: random)
  8. ['realtime'] = (boolean) Specify whether to perform the operation in realtime or search mode
  9. ['refresh'] = (boolean) Refresh the shard containing the document before performing the operation
  10. ['routing'] = (string) Specific routing value
  11. ['body'] = (array) Request body
  12. */
  13. $params = [
  14. // ...
  15. ];
  16. $client = ClientBuilder::create()->build();
  17. $response = $client->getSource($params);

delete()

  1. /*
  2. $params['id'] = (string) The document ID (Required)
  3. ['index'] = (string) The name of the index (Required)
  4. ['type'] = (string) The type of the document (Required)
  5. ['consistency'] = (enum) Specific write consistency setting for the operation
  6. ['parent'] = (string) ID of parent document
  7. ['refresh'] = (boolean) Refresh the index after performing the operation
  8. ['replication'] = (enum) Specific replication type
  9. ['routing'] = (string) Specific routing value
  10. ['timeout'] = (time) Explicit operation timeout
  11. ['version_type'] = (enum) Specific version type
  12. ['body'] = (array) Request body
  13. */
  14. $params = [
  15. // ...
  16. ];
  17. $client = ClientBuilder::create()->build();
  18. $response = $client->delete($params);

deleteByQuery()

  1. /*
  2. $params['_source'] = (list) True or false to return the _source field or not, or a list of fields to return
  3. ['_source_exclude'] = (array) A list of fields to exclude from the returned _source field
  4. ['_source_include'] = (array) A list of fields to extract and return from the _source field
  5. ['allow_no_indices'] = (bool) Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
  6. ['analyze_wildcard'] = (bool) Specify whether wildcard and prefix queries should be analyzed (default: false)
  7. ['analyzer'] = (string) The analyzer to use for the query string
  8. ['conflicts'] = (enum) What to do when the delete-by-query hits version conflicts?
  9. ['default_operator'] = (enum) The default operator for query string query (AND or OR)
  10. ['df'] = (string) The field to use as default where no field prefix is given in the query string
  11. ['expand_wildcards'] = (enum) Whether to expand wildcard expression to concrete indices that are open, closed or both.
  12. ['body'] = (array) Request body
  13. */
  14. $params = [
  15. // ...
  16. ];
  17. $client = ClientBuilder::create()->build();
  18. $response = $client->deleteByQuery($params);

count()

  1. /*
  2. $params['index'] = (list) A comma-separated list of indices to restrict the results
  3. ['type'] = (list) A comma-separated list of types to restrict the results
  4. ['min_score'] = (number) Include only documents with a specific `_score` value in the result
  5. ['preference'] = (string) Specify the node or shard the operation should be performed on (default: random)
  6. ['routing'] = (string) Specific routing value
  7. ['source'] = (string) The URL-encoded query definition (instead of using the request body)
  8. ['body'] = (array) A query to restrict the results (optional)
  9. ['ignore_unavailable'] = (bool) Whether specified concrete indices should be ignored when unavailable (missing or closed)
  10. ['allow_no_indices'] = (bool) Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
  11. ['expand_wildcards'] = (enum) Whether to expand wildcard expression to concrete indices that are open, closed or both.
  12. ['body'] = (array) Request body
  13. */
  14. $params = [
  15. // ...
  16. ];
  17. $client = ClientBuilder::create()->build();
  18. $response = $client->count($params);

countPercolate()

  1. /*
  2. $params['index'] = (list) A comma-separated list of indices to restrict the results
  3. ['type'] = (list) A comma-separated list of types to restrict the results
  4. ['id'] = (string) ID of document
  5. ['ignore_unavailable'] = (boolean) Whether specified concrete indices should be ignored when unavailable (missing or closed)
  6. ['preference'] = (string) Specify the node or shard the operation should be performed on (default: random)
  7. ['routing'] = (string) Specific routing value
  8. ['allow_no_indices'] = (boolean) Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
  9. ['body'] = (array) A query to restrict the results (optional)
  10. ['ignore_unavailable'] = (bool) Whether specified concrete indices should be ignored when unavailable (missing or closed)
  11. ['percolate_index'] = (string) The index to count percolate the document into. Defaults to index.
  12. ['body'] = (array) Request body
  13. */
  14. $params = [
  15. // ...
  16. ];
  17. $client = ClientBuilder::create()->build();
  18. $response = $client->countPercolate($params);

percolate()

  1. /*
  2. $params['index'] = (string) The name of the index with a registered percolator query (Required)
  3. ['type'] = (string) The document type (Required)
  4. ['prefer_local'] = (boolean) With `true`, specify that a local shard should be used if available, with `false`, use a random shard (default: true)
  5. ['body'] = (array) The document (`doc`) to percolate against registered queries; optionally also a `query` to limit the percolation to specific registered queries
  6. ['body'] = (array) Request body
  7. */
  8. $params = [
  9. // ...
  10. ];
  11. $client = ClientBuilder::create()->build();
  12. $response = $client->percolate($params);

mpercolate()

  1. /*
  2. $params['index'] = (string) Default index for items which don't provide one
  3. ['type'] = (string) Default document type for items which don't provide one
  4. ['ignore_unavailable'] = (boolean) Whether specified concrete indices should be ignored when unavailable (missing or closed)
  5. ['allow_no_indices'] = (boolean) Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
  6. ['expand_wildcards'] = (enum) Whether to expand wildcard expression to concrete indices that are open, closed or both.
  7. ['body'] = (array) Request body
  8. */
  9. $params = [
  10. // ...
  11. ];
  12. $client = ClientBuilder::create()->build();
  13. $response = $client->mpercolate($params);

termvectors()

  1. /*
  2. $params['index'] = (string) Default index for items which don't provide one
  3. ['type'] = (string) Default document type for items which don't provide one
  4. ['term_statistics'] = (boolean) Specifies if total term frequency and document frequency should be returned. Applies to all returned documents unless otherwise specified in body \"params\" or \"docs\"."
  5. ['field_statistics'] = (boolean) Specifies if document count, sum of document frequencies and sum of total term frequencies should be returned. Applies to all returned documents unless otherwise specified in body \"params\" or \"docs\"."
  6. ['fields'] = (list) A comma-separated list of fields to return. Applies to all returned documents unless otherwise specified in body \"params\" or \"docs\"."
  7. ['offsets'] = (boolean) Specifies if term offsets should be returned. Applies to all returned documents unless otherwise specified in body \"params\" or \"docs\"."
  8. ['positions'] = (boolean) Specifies if term positions should be returned. Applies to all returned documents unless otherwise specified in body \"params\" or \"docs\"."
  9. ['payloads'] = (boolean) Specifies if term payloads should be returned. Applies to all returned documents unless otherwise specified in body \"params\" or \"docs\".
  10. ['body'] = (array) Request body
  11. */
  12. $params = [
  13. // ...
  14. ];
  15. $client = ClientBuilder::create()->build();
  16. $response = $client->termvectors($params);

mtermvectors()

  1. /*
  2. $params['index'] = (string) Default index for items which don't provide one
  3. ['type'] = (string) Default document type for items which don't provide one
  4. ['ids'] = (list) A comma-separated list of documents ids. You must define ids as parameter or set \"ids\" or \"docs\" in the request body
  5. ['term_statistics'] = (boolean) Specifies if total term frequency and document frequency should be returned. Applies to all returned documents unless otherwise specified in body \"params\" or \"docs\"."
  6. ['field_statistics'] = (boolean) Specifies if document count, sum of document frequencies and sum of total term frequencies should be returned. Applies to all returned documents unless otherwise specified in body \"params\" or \"docs\"."
  7. ['fields'] = (list) A comma-separated list of fields to return. Applies to all returned documents unless otherwise specified in body \"params\" or \"docs\"."
  8. ['offsets'] = (boolean) Specifies if term offsets should be returned. Applies to all returned documents unless otherwise specified in body \"params\" or \"docs\"."
  9. ['positions'] = (boolean) Specifies if term positions should be returned. Applies to all returned documents unless otherwise specified in body \"params\" or \"docs\"."
  10. ['payloads'] = (boolean) Specifies if term payloads should be returned. Applies to all returned documents unless otherwise specified in body \"params\" or \"docs\".
  11. ['body'] = (array) Request body
  12. */
  13. $params = [
  14. // ...
  15. ];
  16. $client = ClientBuilder::create()->build();
  17. $response = $client->mtermvectors($params);

exists()

  1. /*
  2. $params['id'] = (string) The document ID (Required)
  3. ['index'] = (string) The name of the index (Required)
  4. ['type'] = (string) The type of the document (use `_all` to fetch the first document matching the ID across all types) (Required)
  5. ['parent'] = (string) The ID of the parent document
  6. ['preference'] = (string) Specify the node or shard the operation should be performed on (default: random)
  7. ['realtime'] = (boolean) Specify whether to perform the operation in realtime or search mode
  8. ['refresh'] = (boolean) Refresh the shard containing the document before performing the operation
  9. ['routing'] = (string) Specific routing value
  10. ['body'] = (array) Request body
  11. */
  12. $params = [
  13. // ...
  14. ];
  15. $client = ClientBuilder::create()->build();
  16. $response = $client->exists($params);

mget()

  1. /*
  2. $params['index'] = (string) The name of the index
  3. ['type'] = (string) The type of the document
  4. ['fields'] = (list) A comma-separated list of fields to return in the response
  5. ['parent'] = (string) The ID of the parent document
  6. ['preference'] = (string) Specify the node or shard the operation should be performed on (default: random)
  7. ['realtime'] = (boolean) Specify whether to perform the operation in realtime or search mode
  8. ['refresh'] = (boolean) Refresh the shard containing the document before performing the operation
  9. ['routing'] = (string) Specific routing value
  10. ['body'] = (array) Document identifiers; can be either `docs` (containing full document information) or `ids` (when index and type is provided in the URL.
  11. ['body'] = (array) Request body
  12. */
  13. $params = [
  14. // ...
  15. ];
  16. $client = ClientBuilder::create()->build();
  17. $response = $client->mget($params);

msearch()

  1. /*
  2. $params['index'] = (list) A comma-separated list of index names to use as default
  3. ['type'] = (list) A comma-separated list of document types to use as default
  4. ['search_type'] = (enum) Search operation type
  5. ['body'] = (array|string) The request definitions (metadata-search request definition pairs), separated by newlines
  6. ['body'] = (array) Request body
  7. */
  8. $params = [
  9. // ...
  10. ];
  11. $client = ClientBuilder::create()->build();
  12. $response = $client->msearch($params);

msearchTemplate()

  1. /*
  2. $params['index'] = (list) A comma-separated list of index names to use as default
  3. ['type'] = (list) A comma-separated list of document types to use as default
  4. ['search_type'] = (enum) Search operation type
  5. ['body'] = (array|string) The request definitions (metadata-search request definition pairs), separated by newlines
  6. ['max_concurrent_searches'] = (number) Controls the maximum number of concurrent searches the multi search api will execute
  7. ['body'] = (array) Request body
  8. */
  9. $params = [
  10. // ...
  11. ];
  12. $client = ClientBuilder::create()->build();
  13. $response = $client->msearchTemplate($params);

create()

  1. /*
  2. $params['index'] = (string) The name of the index (Required)
  3. ['type'] = (string) The type of the document (Required)
  4. ['id'] = (string) Specific document ID (when the POST method is used)
  5. ['consistency'] = (enum) Explicit write consistency setting for the operation
  6. ['parent'] = (string) ID of the parent document
  7. ['refresh'] = (boolean) Refresh the index after performing the operation
  8. ['replication'] = (enum) Specific replication type
  9. ['routing'] = (string) Specific routing value
  10. ['timeout'] = (time) Explicit operation timeout
  11. ['timestamp'] = (time) Explicit timestamp for the document
  12. ['ttl'] = (duration) Expiration time for the document
  13. ['version'] = (number) Explicit version number for concurrency control
  14. ['version_type'] = (enum) Specific version type
  15. ['body'] = (array) The document
  16. ['body'] = (array) Request body
  17. */
  18. $params = [
  19. // ...
  20. ];
  21. $client = ClientBuilder::create()->build();
  22. $response = $client->create($params);

bulk()

  1. /*
  2. $params['index'] = (string) Default index for items which don't provide one
  3. ['type'] = (string) Default document type for items which don't provide one
  4. ['consistency'] = (enum) Explicit write consistency setting for the operation
  5. ['refresh'] = (boolean) Refresh the index after performing the operation
  6. ['replication'] = (enum) Explicitly set the replication type
  7. ['fields'] = (list) Default comma-separated list of fields to return in the response for updates
  8. ['body'] = (array) The document
  9. ['body'] = (array) Request body
  10. */
  11. $params = [
  12. // ...
  13. ];
  14. $client = ClientBuilder::create()->build();
  15. $response = $client->bulk($params);

index()

  1. /*
  2. $params['index'] = (string) The name of the index (Required)
  3. ['type'] = (string) The type of the document (Required)
  4. ['id'] = (string) Specific document ID (when the POST method is used)
  5. ['consistency'] = (enum) Explicit write consistency setting for the operation
  6. ['op_type'] = (enum) Explicit operation type
  7. ['parent'] = (string) ID of the parent document
  8. ['refresh'] = (boolean) Refresh the index after performing the operation
  9. ['replication'] = (enum) Specific replication type
  10. ['routing'] = (string) Specific routing value
  11. ['timeout'] = (time) Explicit operation timeout
  12. ['timestamp'] = (time) Explicit timestamp for the document
  13. ['ttl'] = (duration) Expiration time for the document
  14. ['version'] = (number) Explicit version number for concurrency control
  15. ['version_type'] = (enum) Specific version type
  16. ['body'] = (array) The document
  17. ['body'] = (array) Request body
  18. */
  19. $params = [
  20. // ...
  21. ];
  22. $client = ClientBuilder::create()->build();
  23. $response = $client->index($params);

reindex()

  1. /*
  2. $params['refresh'] = (boolean) Should the effected indexes be refreshed?
  3. ['timeout'] = (time) Time each individual bulk request should wait for shards that are unavailable
  4. ['consistency'] = (enum) Explicit write consistency setting for the operation
  5. ['wait_for_completion'] = (boolean) Should the request should block until the reindex is complete
  6. ['requests_per_second'] = (float) The throttle for this request in sub-requests per second. 0 means set no throttle
  7. ['body'] = (array) The search definition using the Query DSL and the prototype for the index request (Required)
  8. ['body'] = (array) Request body
  9. */
  10. $params = [
  11. // ...
  12. ];
  13. $client = ClientBuilder::create()->build();
  14. $response = $client->reindex($params);

suggest()

  1. /*
  2. $params['index'] = (list) A comma-separated list of index names to restrict the operation; use `_all` or empty string to perform the operation on all indices
  3. ['ignore_indices'] = (enum) When performed on multiple indices, allows to ignore `missing` ones
  4. ['preference'] = (string) Specify the node or shard the operation should be performed on (default: random)
  5. ['routing'] = (string) Specific routing value
  6. ['source'] = (string) The URL-encoded request definition (instead of using request body)
  7. ['body'] = (array) The request definition
  8. ['body'] = (array) Request body
  9. */
  10. $params = [
  11. // ...
  12. ];
  13. $client = ClientBuilder::create()->build();
  14. $response = $client->suggest($params);

explain()

  1. /*
  2. $params['id'] = (string) The document ID (Required)
  3. ['index'] = (string) The name of the index (Required)
  4. ['type'] = (string) The type of the document (Required)
  5. ['analyze_wildcard'] = (boolean) Specify whether wildcards and prefix queries in the query string query should be analyzed (default: false)
  6. ['analyzer'] = (string) The analyzer for the query string query
  7. ['default_operator'] = (enum) The default operator for query string query (AND or OR)
  8. ['df'] = (string) The default field for query string query (default: _all)
  9. ['fields'] = (list) A comma-separated list of fields to return in the response
  10. ['lenient'] = (boolean) Specify whether format-based query failures (such as providing text to a numeric field) should be ignored
  11. ['lowercase_expanded_terms'] = (boolean) Specify whether query terms should be lowercased
  12. ['parent'] = (string) The ID of the parent document
  13. ['preference'] = (string) Specify the node or shard the operation should be performed on (default: random)
  14. ['q'] = (string) Query in the Lucene query string syntax
  15. ['routing'] = (string) Specific routing value
  16. ['source'] = (string) The URL-encoded query definition (instead of using the request body)
  17. ['_source'] = (list) True or false to return the _source field or not, or a list of fields to return
  18. ['_source_exclude'] = (list) A list of fields to exclude from the returned _source field
  19. ['_source_include'] = (list) A list of fields to extract and return from the _source field
  20. ['body'] = (string) The URL-encoded query definition (instead of using the request body)
  21. ['body'] = (array) Request body
  22. */
  23. $params = [
  24. // ...
  25. ];
  26. $client = ClientBuilder::create()->build();
  27. $response = $client->explain($params);

search()

  1. /*
  2. $params['index'] = (list) A comma-separated list of index names to search; use `_all` or empty string to perform the operation on all indices
  3. ['type'] = (list) A comma-separated list of document types to search; leave empty to perform the operation on all types
  4. ['analyzer'] = (string) The analyzer to use for the query string
  5. ['analyze_wildcard'] = (boolean) Specify whether wildcard and prefix queries should be analyzed (default: false)
  6. ['default_operator'] = (enum) The default operator for query string query (AND or OR)
  7. ['df'] = (string) The field to use as default where no field prefix is given in the query string
  8. ['explain'] = (boolean) Specify whether to return detailed information about score computation as part of a hit
  9. ['fields'] = (list) A comma-separated list of fields to return as part of a hit
  10. ['from'] = (number) Starting offset (default: 0)
  11. ['ignore_indices'] = (enum) When performed on multiple indices, allows to ignore `missing` ones
  12. ['indices_boost'] = (list) Comma-separated list of index boosts
  13. ['lenient'] = (boolean) Specify whether format-based query failures (such as providing text to a numeric field) should be ignored
  14. ['lowercase_expanded_terms'] = (boolean) Specify whether query terms should be lowercased
  15. ['preference'] = (string) Specify the node or shard the operation should be performed on (default: random)
  16. ['q'] = (string) Query in the Lucene query string syntax
  17. ['query_cache'] = (boolean) Enable query cache for this request
  18. ['request_cache'] = (boolean) Enable request cache for this request
  19. ['routing'] = (list) A comma-separated list of specific routing values
  20. ['scroll'] = (duration) Specify how long a consistent view of the index should be maintained for scrolled search
  21. ['search_type'] = (enum) Search operation type
  22. ['size'] = (number) Number of hits to return (default: 10)
  23. ['sort'] = (list) A comma-separated list of <field>:<direction> pairs
  24. ['source'] = (string) The URL-encoded request definition using the Query DSL (instead of using request body)
  25. ['_source'] = (list) True or false to return the _source field or not, or a list of fields to return
  26. ['_source_exclude'] = (list) A list of fields to exclude from the returned _source field
  27. ['_source_include'] = (list) A list of fields to extract and return from the _source field
  28. ['stats'] = (list) Specific 'tag' of the request for logging and statistical purposes
  29. ['suggest_field'] = (string) Specify which field to use for suggestions
  30. ['suggest_mode'] = (enum) Specify suggest mode
  31. ['suggest_size'] = (number) How many suggestions to return in response
  32. ['suggest_text'] = (text) The source text for which the suggestions should be returned
  33. ['timeout'] = (time) Explicit operation timeout
  34. ['terminate_after'] = (number) The maximum number of documents to collect for each shard, upon reaching which the query execution will terminate early.
  35. ['body'] = (array) Request body
  36. */
  37. $params = [
  38. // ...
  39. ];
  40. $client = ClientBuilder::create()->build();
  41. $response = $client->search($params);

searchShards()

  1. /*
  2. $params['index'] = (list) A comma-separated list of index names to search; use `_all` or empty string to perform the operation on all indices
  3. ['type'] = (list) A comma-separated list of document types to search; leave empty to perform the operation on all types
  4. ['preference'] = (string) Specify the node or shard the operation should be performed on (default: random)
  5. ['routing'] = (string) Specific routing value
  6. ['local'] = (bool) Return local information, do not retrieve the state from master node (default: false)
  7. ['ignore_unavailable'] = (bool) Whether specified concrete indices should be ignored when unavailable (missing or closed)
  8. ['allow_no_indices'] = (bool) Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
  9. ['expand_wildcards'] = (enum) Whether to expand wildcard expression to concrete indices that are open, closed or both.
  10. ['body'] = (array) Request body
  11. */
  12. $params = [
  13. // ...
  14. ];
  15. $client = ClientBuilder::create()->build();
  16. $response = $client->searchShards($params);

searchTemplate()

  1. /*
  2. $params['index'] = (list) A comma-separated list of index names to search; use `_all` or empty string to perform the operation on all indices
  3. ['type'] = (list) A comma-separated list of document types to search; leave empty to perform the operation on all types
  4. ['body'] = (array) Request body
  5. */
  6. $params = [
  7. // ...
  8. ];
  9. $client = ClientBuilder::create()->build();
  10. $response = $client->searchTemplate($params);

scroll()

  1. /*
  2. $params['scroll_id'] = (string) The scroll ID for scrolled search
  3. ['scroll'] = (duration) Specify how long a consistent view of the index should be maintained for scrolled search
  4. ['body'] = (string) The scroll ID for scrolled search
  5. ['body'] = (array) Request body
  6. */
  7. $params = [
  8. // ...
  9. ];
  10. $client = ClientBuilder::create()->build();
  11. $response = $client->scroll($params);

clearScroll()

  1. /*
  2. $params['scroll_id'] = (string) The scroll ID for scrolled search
  3. ['scroll'] = (duration) Specify how long a consistent view of the index should be maintained for scrolled search
  4. ['body'] = (string) The scroll ID for scrolled search
  5. ['body'] = (array) Request body
  6. */
  7. $params = [
  8. // ...
  9. ];
  10. $client = ClientBuilder::create()->build();
  11. $response = $client->clearScroll($params);

update()

  1. /*
  2. $params['id'] = (string) Document ID (Required)
  3. ['index'] = (string) The name of the index (Required)
  4. ['type'] = (string) The type of the document (Required)
  5. ['consistency'] = (enum) Explicit write consistency setting for the operation
  6. ['fields'] = (list) A comma-separated list of fields to return in the response
  7. ['lang'] = (string) The script language (default: mvel)
  8. ['parent'] = (string) ID of the parent document
  9. ['refresh'] = (boolean) Refresh the index after performing the operation
  10. ['replication'] = (enum) Specific replication type
  11. ['retry_on_conflict'] = (number) Specify how many times should the operation be retried when a conflict occurs (default: 0)
  12. ['routing'] = (string) Specific routing value
  13. ['script'] = () The URL-encoded script definition (instead of using request body)
  14. ['timeout'] = (time) Explicit operation timeout
  15. ['timestamp'] = (time) Explicit timestamp for the document
  16. ['ttl'] = (duration) Expiration time for the document
  17. ['version_type'] = (number) Explicit version number for concurrency control
  18. ['body'] = (array) The request definition using either `script` or partial `doc`
  19. ['body'] = (array) Request body
  20. */
  21. $params = [
  22. // ...
  23. ];
  24. $client = ClientBuilder::create()->build();
  25. $response = $client->update($params);

updateByQuery()

  1. /*
  2. $params['index'] = (list) A comma-separated list of index names to search; use `_all` or
  3. empty string to perform the operation on all indices (Required)
  4. ['type'] = (list) A comma-separated list of document types to search; leave empty to
  5. perform the operation on all types
  6. ['analyzer'] = (string) The analyzer to use for the query string
  7. ['analyze_wildcard'] = (boolean) Specify whether wildcard and prefix queries should be analyzed
  8. (default: false)
  9. ['default_operator'] = (enum) The default operator for query string query (AND or OR) (AND,OR)
  10. (default: OR)
  11. ['df'] = (string) The field to use as default where no field prefix is given in the
  12. query string
  13. ['explain'] = (boolean) Specify whether to return detailed information about score
  14. computation as part of a hit
  15. ['fields'] = (list) A comma-separated list of fields to return as part of a hit
  16. ['fielddata_fields'] = (list) A comma-separated list of fields to return as the field data
  17. representation of a field for each hit
  18. ['from'] = (number) Starting offset (default: 0)
  19. ['ignore_unavailable'] = (boolean) Whether specified concrete indices should be ignored when
  20. unavailable (missing or closed)
  21. ['allow_no_indices'] = (boolean) Whether to ignore if a wildcard indices expression resolves into
  22. no concrete indices. (This includes `_all` string or when no indices have been specified)
  23. ['conflicts'] = (enum) What to do when the reindex hits version conflicts? (abort,proceed)
  24. (default: abort)
  25. ['expand_wildcards'] = (enum) Whether to expand wildcard expression to concrete indices that are
  26. open, closed or both. (open,closed,none,all) (default: open)
  27. ['lenient'] = (boolean) Specify whether format-based query failures (such as providing
  28. text to a numeric field) should be ignored
  29. ['lowercase_expanded_terms'] = (boolean) Specify whether query terms should be lowercased
  30. ['preference'] = (string) Specify the node or shard the operation should be performed on
  31. (default: random)
  32. ['q'] = (string) Query in the Lucene query string syntax
  33. ['routing'] = (list) A comma-separated list of specific routing values
  34. ['scroll'] = (duration) Specify how long a consistent view of the index should be
  35. maintained for scrolled search
  36. ['search_type'] = (enum) Search operation type (query_then_fetch,dfs_query_then_fetch)
  37. ['search_timeout'] = (time) Explicit timeout for each search request. Defaults to no timeout.
  38. ['body'] = (array) Request body
  39. */
  40. $params = [
  41. // ...
  42. ];
  43. $client = ClientBuilder::create()->build();
  44. $response = $client->updateByQuery($params);

getScript()

  1. /*
  2. $params['id'] = (string) The script ID (Required)
  3. ['lang'] = (string) The script language (Required)
  4. ['body'] = (array) Request body
  5. */
  6. $params = [
  7. // ...
  8. ];
  9. $client = ClientBuilder::create()->build();
  10. $response = $client->getScript($params);

deleteScript()

  1. /*
  2. $params['id'] = (string) The script ID (Required)
  3. ['lang'] = (string) The script language (Required)
  4. ['body'] = (array) Request body
  5. */
  6. $params = [
  7. // ...
  8. ];
  9. $client = ClientBuilder::create()->build();
  10. $response = $client->deleteScript($params);

putScript()

  1. /*
  2. $params['id'] = (string) The script ID (Required)
  3. ['lang'] = (string) The script language (Required)
  4. ['body'] = (array) Request body
  5. */
  6. $params = [
  7. // ...
  8. ];
  9. $client = ClientBuilder::create()->build();
  10. $response = $client->putScript($params);

getTemplate()

  1. /*
  2. $params['id'] = (string) The search template ID (Required)
  3. ['body'] = (array) Request body
  4. */
  5. $params = [
  6. // ...
  7. ];
  8. $client = ClientBuilder::create()->build();
  9. $response = $client->getTemplate($params);

deleteTemplate()

  1. /*
  2. $params['id'] = (string) The search template ID (Required)
  3. ['body'] = (array) Request body
  4. */
  5. $params = [
  6. // ...
  7. ];
  8. $client = ClientBuilder::create()->build();
  9. $response = $client->deleteTemplate($params);

fieldStats()

  1. /*
  2. $params['index'] = (list) A comma-separated list of indices to restrict the results
  3. ['fields'] = (list) A comma-separated list of fields for to get field statistics for (min value, max value, and more)
  4. ['level'] = (enum) Defines if field stats should be returned on a per index level or on a cluster wide level
  5. ['ignore_unavailable'] = (bool) Whether specified concrete indices should be ignored when unavailable (missing or closed)
  6. ['allow_no_indices'] = (bool) Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
  7. ['expand_wildcards'] = (enum) Whether to expand wildcard expression to concrete indices that are open, closed or both.
  8. ['body'] = (array) Request body
  9. */
  10. $params = [
  11. // ...
  12. ];
  13. $client = ClientBuilder::create()->build();
  14. $response = $client->fieldStats($params);

fieldCaps()

  1. /*
  2. $params['index'] = (list) A comma-separated list of indices to restrict the results
  3. ['ignore_unavailable'] = (bool) Whether specified concrete indices should be ignored when unavailable (missing or closed)
  4. ['allow_no_indices'] = (bool) Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
  5. ['expand_wildcards'] = (enum) Whether to expand wildcard expression to concrete indices that are open, closed or both.
  6. ['body'] = (array) Request body
  7. */
  8. $params = [
  9. // ...
  10. ];
  11. $client = ClientBuilder::create()->build();
  12. $response = $client->fieldCaps($params);

renderSearchTemplate()

  1. /*
  2. $params['id'] = (string) ID of the template to render
  3. ['body'] = (array) Request body
  4. */
  5. $params = [
  6. // ...
  7. ];
  8. $client = ClientBuilder::create()->build();
  9. $response = $client->renderSearchTemplate($params);

indices()

  1. /*
  2. Operate on the Indices Namespace of commands
  3. ['body'] = (array) Request body
  4. */
  5. $params = [
  6. // ...
  7. ];
  8. $client = ClientBuilder::create()->build();
  9. $response = $client->indices();

cluster()

  1. /*
  2. Operate on the Cluster namespace of commands
  3. ['body'] = (array) Request body
  4. */
  5. $params = [
  6. // ...
  7. ];
  8. $client = ClientBuilder::create()->build();
  9. $response = $client->cluster();

nodes()

  1. /*
  2. Operate on the Nodes namespace of commands
  3. ['body'] = (array) Request body
  4. */
  5. $params = [
  6. // ...
  7. ];
  8. $client = ClientBuilder::create()->build();
  9. $response = $client->nodes();

snapshot()

  1. /*
  2. Operate on the Snapshot namespace of commands
  3. ['body'] = (array) Request body
  4. */
  5. $params = [
  6. // ...
  7. ];
  8. $client = ClientBuilder::create()->build();
  9. $response = $client->snapshot();

cat()

  1. /*
  2. Operate on the Cat namespace of commands
  3. ['body'] = (array) Request body
  4. */
  5. $params = [
  6. // ...
  7. ];
  8. $client = ClientBuilder::create()->build();
  9. $response = $client->cat();

ingest()

  1. /*
  2. Operate on the Ingest namespace of commands
  3. ['body'] = (array) Request body
  4. */
  5. $params = [
  6. // ...
  7. ];
  8. $client = ClientBuilder::create()->build();
  9. $response = $client->ingest();

tasks()

  1. /*
  2. Operate on the Tasks namespace of commands
  3. ['body'] = (array) Request body
  4. */
  5. $params = [
  6. // ...
  7. ];
  8. $client = ClientBuilder::create()->build();
  9. $response = $client->tasks();

remote()

  1. /*
  2. Operate on the Remote namespace of commands
  3. ['body'] = (array) Request body
  4. */
  5. $params = [
  6. // ...
  7. ];
  8. $client = ClientBuilder::create()->build();
  9. $response = $client->remote();

__call()

  1. /*
  2. Catchall for registered namespaces
  3. ['body'] = (array) Request body
  4. */
  5. $params = [
  6. // ...
  7. ];
  8. $client = ClientBuilder::create()->build();
  9. $response = $client->__call($name,$arguments);

extractArgument()

  1. /*
  2. */
  3. $params = [
  4. // ...
  5. ];
  6. $client = ClientBuilder::create()->build();
  7. $response = $client->extractArgument($params,$arg);

Elasticsearch\ClientBuilder

Class ClientBuilder

Methods

The class defines the following methods:

create()

  1. /*
  2. */

getTransport()

  1. /*
  2. Can supply first parm to Client::__construct() when invoking manually or with dependency injection
  3. ['body'] = (array) Request body
  4. */

getEndpoint()

  1. /*
  2. Can supply second parm to Client::__construct() when invoking manually or with dependency injection
  3. ['body'] = (array) Request body
  4. */

getRegisteredNamespacesBuilders()

  1. /*
  2. Can supply third parm to Client::__construct() when invoking manually or with dependency injection
  3. ['body'] = (array) Request body
  4. */

fromConfig()

  1. /*
  2. Build a new client from the provided config. Hash keys
  3. should correspond to the method name e.g. ['connectionPool']
  4. corresponds to setConnectionPool().
  5. ['body'] = (array) Request body
  6. */

defaultHandler()

  1. /*
  2. */

multiHandler()

  1. /*
  2. */

singleHandler()

  1. /*
  2. */

setConnectionFactory()

  1. /*
  2. */

setConnectionPool()

  1. /*
  2. */

setEndpoint()

  1. /*
  2. */

registerNamespace()

  1. /*
  2. */

setTransport()

  1. /*
  2. */

setHandler()

  1. /*
  2. */

setLogger()

  1. /*
  2. */

setTracer()

  1. /*
  2. */

setSerializer()

  1. /*
  2. */

setHosts()

  1. /*
  2. */

setConnectionParams()

  1. /*
  2. */

setRetries()

  1. /*
  2. */

setSelector()

  1. /*
  2. */

setSniffOnStart()

  1. /*
  2. */

setSSLCert()

  1. /*
  2. */

setSSLKey()

  1. /*
  2. */

setSSLVerification()

  1. /*
  2. */

build()

  1. /*
  2. */

instantiate()

  1. /*
  2. */

Elasticsearch\Namespaces\CatNamespace

Class CatNamespace

Methods

The class defines the following methods:

aliases()

  1. /*
  2. $params['local'] = (bool) Return local information, do not retrieve the state from master node (default: false)
  3. ['master_timeout'] = (time) Explicit operation timeout for connection to master node
  4. ['h'] = (list) Comma-separated list of column names to display
  5. ['help'] = (bool) Return help information
  6. ['v'] = (bool) Verbose mode. Display column headers
  7. ['body'] = (array) Request body
  8. */
  9. $params = [
  10. // ...
  11. ];
  12. $client = ClientBuilder::create()->build();
  13. $response = $client->cat()->aliases($params);

allocation()

  1. /*
  2. $params['local'] = (bool) Return local information, do not retrieve the state from master node (default: false)
  3. ['master_timeout'] = (time) Explicit operation timeout for connection to master node
  4. ['h'] = (list) Comma-separated list of column names to display
  5. ['help'] = (bool) Return help information
  6. ['v'] = (bool) Verbose mode. Display column headers
  7. ['bytes'] = (enum) The unit in which to display byte values
  8. ['body'] = (array) Request body
  9. */
  10. $params = [
  11. // ...
  12. ];
  13. $client = ClientBuilder::create()->build();
  14. $response = $client->cat()->allocation($params);

count()

  1. /*
  2. $params['local'] = (bool) Return local information, do not retrieve the state from master node (default: false)
  3. ['master_timeout'] = (time) Explicit operation timeout for connection to master node
  4. ['h'] = (list) Comma-separated list of column names to display
  5. ['help'] = (bool) Return help information
  6. ['v'] = (bool) Verbose mode. Display column headers
  7. ['body'] = (array) Request body
  8. */
  9. $params = [
  10. // ...
  11. ];
  12. $client = ClientBuilder::create()->build();
  13. $response = $client->cat()->count($params);

health()

  1. /*
  2. $params['local'] = (bool) Return local information, do not retrieve the state from master node (default: false)
  3. ['master_timeout'] = (time) Explicit operation timeout for connection to master node
  4. ['h'] = (list) Comma-separated list of column names to display
  5. ['help'] = (bool) Return help information
  6. ['v'] = (bool) Verbose mode. Display column headers
  7. ['ts'] = (bool) Set to false to disable timestamping
  8. ['body'] = (array) Request body
  9. */
  10. $params = [
  11. // ...
  12. ];
  13. $client = ClientBuilder::create()->build();
  14. $response = $client->cat()->health($params);

help()

  1. /*
  2. $params['help'] = (bool) Return help information
  3. ['body'] = (array) Request body
  4. */
  5. $params = [
  6. // ...
  7. ];
  8. $client = ClientBuilder::create()->build();
  9. $response = $client->cat()->help($params);

indices()

  1. /*
  2. $params['local'] = (bool) Return local information, do not retrieve the state from master node (default: false)
  3. ['master_timeout'] = (time) Explicit operation timeout for connection to master node
  4. ['h'] = (list) Comma-separated list of column names to display
  5. ['help'] = (bool) Return help information
  6. ['v'] = (bool) Verbose mode. Display column headers
  7. ['bytes'] = (enum) The unit in which to display byte values
  8. ['pri'] = (bool) Set to true to return stats only for primary shards
  9. ['body'] = (array) Request body
  10. */
  11. $params = [
  12. // ...
  13. ];
  14. $client = ClientBuilder::create()->build();
  15. $response = $client->cat()->indices($params);

master()

  1. /*
  2. $params['local'] = (bool) Return local information, do not retrieve the state from master node (default: false)
  3. ['master_timeout'] = (time) Explicit operation timeout for connection to master node
  4. ['h'] = (list) Comma-separated list of column names to display
  5. ['help'] = (bool) Return help information
  6. ['v'] = (bool) Verbose mode. Display column headers
  7. ['body'] = (array) Request body
  8. */
  9. $params = [
  10. // ...
  11. ];
  12. $client = ClientBuilder::create()->build();
  13. $response = $client->cat()->master($params);

nodes()

  1. /*
  2. $params['local'] = (bool) Return local information, do not retrieve the state from master node (default: false)
  3. ['master_timeout'] = (time) Explicit operation timeout for connection to master node
  4. ['h'] = (list) Comma-separated list of column names to display
  5. ['help'] = (bool) Return help information
  6. ['v'] = (bool) Verbose mode. Display column headers
  7. ['body'] = (array) Request body
  8. */
  9. $params = [
  10. // ...
  11. ];
  12. $client = ClientBuilder::create()->build();
  13. $response = $client->cat()->nodes($params);

nodeAttrs()

  1. /*
  2. $params['local'] = (bool) Return local information, do not retrieve the state from master node (default: false)
  3. ['master_timeout'] = (time) Explicit operation timeout for connection to master node
  4. ['h'] = (list) Comma-separated list of column names to display
  5. ['help'] = (bool) Return help information
  6. ['v'] = (bool) Verbose mode. Display column headers
  7. ['body'] = (array) Request body
  8. */
  9. $params = [
  10. // ...
  11. ];
  12. $client = ClientBuilder::create()->build();
  13. $response = $client->cat()->nodeAttrs($params);

pendingTasks()

  1. /*
  2. $params['local'] = (bool) Return local information, do not retrieve the state from master node (default: false)
  3. ['master_timeout'] = (time) Explicit operation timeout for connection to master node
  4. ['h'] = (list) Comma-separated list of column names to display
  5. ['help'] = (bool) Return help information
  6. ['v'] = (bool) Verbose mode. Display column headers
  7. ['body'] = (array) Request body
  8. */
  9. $params = [
  10. // ...
  11. ];
  12. $client = ClientBuilder::create()->build();
  13. $response = $client->cat()->pendingTasks($params);

recovery()

  1. /*
  2. $params['local'] = (bool) Return local information, do not retrieve the state from master node (default: false)
  3. ['master_timeout'] = (time) Explicit operation timeout for connection to master node
  4. ['h'] = (list) Comma-separated list of column names to display
  5. ['help'] = (bool) Return help information
  6. ['v'] = (bool) Verbose mode. Display column headers
  7. ['bytes'] = (enum) The unit in which to display byte values
  8. ['body'] = (array) Request body
  9. */
  10. $params = [
  11. // ...
  12. ];
  13. $client = ClientBuilder::create()->build();
  14. $response = $client->cat()->recovery($params);

repositories()

  1. /*
  2. $params['local'] = (bool) Return local information, do not retrieve the state from master node (default: false)
  3. ['master_timeout'] = (time) Explicit operation timeout for connection to master node
  4. ['h'] = (list) Comma-separated list of column names to display
  5. ['help'] = (bool) Return help information
  6. ['v'] = (bool) Verbose mode. Display column headers
  7. ['body'] = (array) Request body
  8. */
  9. $params = [
  10. // ...
  11. ];
  12. $client = ClientBuilder::create()->build();
  13. $response = $client->cat()->repositories($params);

shards()

  1. /*
  2. $params['local'] = (bool) Return local information, do not retrieve the state from master node (default: false)
  3. ['master_timeout'] = (time) Explicit operation timeout for connection to master node
  4. ['h'] = (list) Comma-separated list of column names to display
  5. ['help'] = (bool) Return help information
  6. ['v'] = (bool) Verbose mode. Display column headers
  7. ['bytes'] = (enum) The unit in which to display byte values
  8. ['body'] = (array) Request body
  9. */
  10. $params = [
  11. // ...
  12. ];
  13. $client = ClientBuilder::create()->build();
  14. $response = $client->cat()->shards($params);

snapshots()

  1. /*
  2. $params['local'] = (bool) Return local information, do not retrieve the state from master node (default: false)
  3. ['master_timeout'] = (time) Explicit operation timeout for connection to master node
  4. ['h'] = (list) Comma-separated list of column names to display
  5. ['help'] = (bool) Return help information
  6. ['v'] = (bool) Verbose mode. Display column headers
  7. ['bytes'] = (enum) The unit in which to display byte values
  8. ['repository'] = (string) Name of repository from which to fetch the snapshot information
  9. ['body'] = (array) Request body
  10. */
  11. $params = [
  12. // ...
  13. ];
  14. $client = ClientBuilder::create()->build();
  15. $response = $client->cat()->snapshots($params);

threadPool()

  1. /*
  2. $params['local'] = (bool) Return local information, do not retrieve the state from master node (default: false)
  3. ['master_timeout'] = (time) Explicit operation timeout for connection to master node
  4. ['h'] = (list) Comma-separated list of column names to display
  5. ['help'] = (bool) Return help information
  6. ['v'] = (bool) Verbose mode. Display column headers
  7. ['full_id'] = (bool) Enables displaying the complete node ids
  8. ['size'] = (enum) The multiplier in which to display values ([ "", "k", "m", "g", "t", "p" ])
  9. ['body'] = (array) Request body
  10. */
  11. $params = [
  12. // ...
  13. ];
  14. $client = ClientBuilder::create()->build();
  15. $response = $client->cat()->threadPool($params);

fielddata()

  1. /*
  2. $params['local'] = (bool) Return local information, do not retrieve the state from master node (default: false)
  3. ['master_timeout'] = (time) Explicit operation timeout for connection to master node
  4. ['h'] = (list) Comma-separated list of column names to display
  5. ['help'] = (bool) Return help information
  6. ['v'] = (bool) Verbose mode. Display column headers
  7. ['bytes'] = (enum) The unit in which to display byte values
  8. ['fields'] = (list) A comma-separated list of fields to return the fielddata size
  9. ['body'] = (array) Request body
  10. */
  11. $params = [
  12. // ...
  13. ];
  14. $client = ClientBuilder::create()->build();
  15. $response = $client->cat()->fielddata($params);

plugins()

  1. /*
  2. $params['local'] = (bool) Return local information, do not retrieve the state from master node (default: false)
  3. ['master_timeout'] = (time) Explicit operation timeout for connection to master node
  4. ['h'] = (list) Comma-separated list of column names to display
  5. ['help'] = (bool) Return help information
  6. ['v'] = (bool) Verbose mode. Display column headers
  7. ['body'] = (array) Request body
  8. */
  9. $params = [
  10. // ...
  11. ];
  12. $client = ClientBuilder::create()->build();
  13. $response = $client->cat()->plugins($params);

segments()

  1. /*
  2. $params['h'] = (list) Comma-separated list of column names to display
  3. ['help'] = (bool) Return help information
  4. ['v'] = (bool) Verbose mode. Display column headers
  5. ['body'] = (array) Request body
  6. */
  7. $params = [
  8. // ...
  9. ];
  10. $client = ClientBuilder::create()->build();
  11. $response = $client->cat()->segments($params);

tasks()

  1. /*
  2. $params['format'] = (string) a short version of the Accept header, e.g. json, yaml
  3. ['node_id'] = (list) A comma-separated list of node IDs or names to limit the returned information; use `_local` to return information from the node you're connecting to, leave empty to get information from all nodes
  4. ['format'] = (string) a short version of the Accept header, e.g. json, yaml
  5. ['actions'] = (list) A comma-separated list of actions that should be returned. Leave empty to return all.
  6. ['body'] = (array) Request body
  7. */
  8. $params = [
  9. // ...
  10. ];
  11. $client = ClientBuilder::create()->build();
  12. $response = $client->cat()->tasks($params);

templates()

  1. /*
  2. $params['local'] = (bool) Return local information, do not retrieve the state from master node (default: false)
  3. ['master_timeout'] = (time) Explicit operation timeout for connection to master node
  4. ['h'] = (list) Comma-separated list of column names to display
  5. ['help'] = (bool) Return help information
  6. ['v'] = (bool) Verbose mode. Display column headers
  7. ['bytes'] = (enum) The unit in which to display byte values
  8. ['body'] = (array) Request body
  9. */
  10. $params = [
  11. // ...
  12. ];
  13. $client = ClientBuilder::create()->build();
  14. $response = $client->cat()->templates($params);

Elasticsearch\Namespaces\ClusterNamespace

Class ClusterNamespace

Methods

The class defines the following methods:

health()

  1. /*
  2. $params['index'] = (string) Limit the information returned to a specific index
  3. ['level'] = (enum) Specify the level of detail for returned information
  4. ['local'] = (boolean) Return local information, do not retrieve the state from master node (default: false)
  5. ['master_timeout'] = (time) Explicit operation timeout for connection to master node
  6. ['timeout'] = (time) Explicit operation timeout
  7. ['wait_for_active_shards'] = (number) Wait until the specified number of shards is active
  8. ['wait_for_nodes'] = (number) Wait until the specified number of nodes is available
  9. ['wait_for_relocating_shards'] = (number) Wait until the specified number of relocating shards is finished
  10. ['wait_for_status'] = (enum) Wait until cluster is in a specific state
  11. ['body'] = (array) Request body
  12. */
  13. $params = [
  14. // ...
  15. ];
  16. $client = ClientBuilder::create()->build();
  17. $response = $client->cluster()->health($params);

reroute()

  1. /*
  2. $params['dry_run'] = (boolean) Simulate the operation only and return the resulting state
  3. ['filter_metadata'] = (boolean) Don't return cluster state metadata (default: false)
  4. ['body'] = (boolean) Don't return cluster state metadata (default: false)
  5. ['explain'] = (boolean) Return an explanation of why the commands can or cannot be executed
  6. ['body'] = (array) Request body
  7. */
  8. $params = [
  9. // ...
  10. ];
  11. $client = ClientBuilder::create()->build();
  12. $response = $client->cluster()->reroute($params);

state()

  1. /*
  2. $params['filter_blocks'] = (boolean) Do not return information about blocks
  3. ['filter_index_templates'] = (boolean) Do not return information about index templates
  4. ['filter_indices'] = (list) Limit returned metadata information to specific indices
  5. ['filter_metadata'] = (boolean) Do not return information about indices metadata
  6. ['filter_nodes'] = (boolean) Do not return information about nodes
  7. ['filter_routing_table'] = (boolean) Do not return information about shard allocation (`routing_table` and `routing_nodes`)
  8. ['local'] = (boolean) Return local information, do not retrieve the state from master node (default: false)
  9. ['master_timeout'] = (time) Specify timeout for connection to master
  10. ['body'] = (array) Request body
  11. */
  12. $params = [
  13. // ...
  14. ];
  15. $client = ClientBuilder::create()->build();
  16. $response = $client->cluster()->state($params);

stats()

  1. /*
  2. $params['flat_settings'] = (boolean) Return settings in flat format (default: false)
  3. ['human'] = (boolean) Whether to return time and byte values in human-readable format.
  4. ['body'] = (array) Request body
  5. */
  6. $params = [
  7. // ...
  8. ];
  9. $client = ClientBuilder::create()->build();
  10. $response = $client->cluster()->stats($params);

putSettings()

  1. /*
  2. $params['body'] = ()
  3. ['body'] = (array) Request body
  4. */
  5. $params = [
  6. // ...
  7. ];
  8. $client = ClientBuilder::create()->build();
  9. $response = $client->cluster()->putSettings($params);

getSettings()

  1. /*
  2. */
  3. $params = [
  4. // ...
  5. ];
  6. $client = ClientBuilder::create()->build();
  7. $response = $client->cluster()->getSettings($params);

pendingTasks()

  1. /*
  2. $params['local'] = (bool) Return local information, do not retrieve the state from master node (default: false)
  3. ['master_timeout'] = (time) Specify timeout for connection to master
  4. ['body'] = (array) Request body
  5. */
  6. $params = [
  7. // ...
  8. ];
  9. $client = ClientBuilder::create()->build();
  10. $response = $client->cluster()->pendingTasks($params);

allocationExplain()

  1. /*
  2. $params['include_yes_decisions'] = (bool) Return 'YES' decisions in explanation (default: false)
  3. ['body'] = (array) Request body
  4. */
  5. $params = [
  6. // ...
  7. ];
  8. $client = ClientBuilder::create()->build();
  9. $response = $client->cluster()->allocationExplain($params);

remoteInfo()

  1. /*
  2. $params[]
  3. ['body'] = (array) Request body
  4. */
  5. $params = [
  6. // ...
  7. ];
  8. $client = ClientBuilder::create()->build();
  9. $response = $client->cluster()->remoteInfo($params);

Elasticsearch\Namespaces\IndicesNamespace

Class IndicesNamespace

Methods

The class defines the following methods:

exists()

  1. /*
  2. $params['index'] = (list) A comma-separated list of indices to check (Required)
  3. ['body'] = (array) Request body
  4. */
  5. $params = [
  6. // ...
  7. ];
  8. $client = ClientBuilder::create()->build();
  9. $response = $client->indices()->exists($params);

get()

  1. /*
  2. $params['index'] = (list) A comma-separated list of indices to check (Required)
  3. ['feature'] = (list) A comma-separated list of features to return
  4. ['ignore_unavailable'] = (bool) Whether specified concrete indices should be ignored when unavailable (missing or closed)
  5. ['allow_no_indices'] = (bool) Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
  6. ['expand_wildcards'] = (enum) Whether to expand wildcard expression to concrete indices that are open, closed or both.
  7. ['body'] = (array) Request body
  8. */
  9. $params = [
  10. // ...
  11. ];
  12. $client = ClientBuilder::create()->build();
  13. $response = $client->indices()->get($params);

segments()

  1. /*
  2. $params['index'] = (list) A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices
  3. ['operation_threading'] = () TODO: ?
  4. ['ignore_unavailable'] = (bool) Whether specified concrete indices should be ignored when unavailable (missing or closed)
  5. ['allow_no_indices'] = (bool) Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
  6. ['expand_wildcards'] = (enum) Whether to expand wildcard expression to concrete indices that are open, closed or both.
  7. ['body'] = (array) Request body
  8. */
  9. $params = [
  10. // ...
  11. ];
  12. $client = ClientBuilder::create()->build();
  13. $response = $client->indices()->segments($params);

deleteTemplate()

  1. /*
  2. $params['name'] = (string) The name of the template (Required)
  3. ['timeout'] = (time) Explicit operation timeout
  4. ['body'] = (array) Request body
  5. */
  6. $params = [
  7. // ...
  8. ];
  9. $client = ClientBuilder::create()->build();
  10. $response = $client->indices()->deleteTemplate($params);

delete()

  1. /*
  2. $params['index'] = (list) A comma-separated list of indices to delete; use `_all` or empty string to delete all indices
  3. ['timeout'] = (time) Explicit operation timeout
  4. ['body'] = (array) Request body
  5. */
  6. $params = [
  7. // ...
  8. ];
  9. $client = ClientBuilder::create()->build();
  10. $response = $client->indices()->delete($params);

stats()

  1. /*
  2. $params['fields'] = (boolean) A comma-separated list of fields for `fielddata` metric (supports wildcards)
  3. ['index'] = (list) A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices
  4. ['indexing_types'] = (list) A comma-separated list of document types to include in the `indexing` statistics
  5. ['metric_family'] = (enum) Limit the information returned to a specific metric
  6. ['search_groups'] = (list) A comma-separated list of search groups to include in the `search` statistics
  7. ['all'] = (boolean) Return all available information
  8. ['clear'] = (boolean) Reset the default level of detail
  9. ['docs'] = (boolean) Return information about indexed and deleted documents
  10. ['fielddata'] = (boolean) Return information about field data
  11. ['filter_cache'] = (boolean) Return information about filter cache
  12. ['flush'] = (boolean) Return information about flush operations
  13. ['get'] = (boolean) Return information about get operations
  14. ['groups'] = (boolean) A comma-separated list of search groups for `search` statistics
  15. ['id_cache'] = (boolean) Return information about ID cache
  16. ['ignore_indices'] = (enum) When performed on multiple indices, allows to ignore `missing` ones
  17. ['indexing'] = (boolean) Return information about indexing operations
  18. ['merge'] = (boolean) Return information about merge operations
  19. ['refresh'] = (boolean) Return information about refresh operations
  20. ['search'] = (boolean) Return information about search operations; use the `groups` parameter to include information for specific search groups
  21. ['store'] = (boolean) Return information about the size of the index
  22. ['body'] = (array) Request body
  23. */
  24. $params = [
  25. // ...
  26. ];
  27. $client = ClientBuilder::create()->build();
  28. $response = $client->indices()->stats($params);

putSettings()

  1. /*
  2. $params['index'] = (list) A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices
  3. ['body'] = (list) A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices
  4. ['body'] = (array) Request body
  5. */
  6. $params = [
  7. // ...
  8. ];
  9. $client = ClientBuilder::create()->build();
  10. $response = $client->indices()->putSettings($params);

snapshotIndex()

  1. /*
  2. $params['index'] = (list) A comma-separated list of index names; use `_all` or empty string for all indices
  3. ['ignore_unavailable'] = (bool) Whether specified concrete indices should be ignored when unavailable (missing or closed)
  4. ['allow_no_indices'] = (bool) Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
  5. ['expand_wildcards'] = (enum) Whether to expand wildcard expression to concrete indices that are open, closed or both.
  6. ['body'] = (array) Request body
  7. */
  8. $params = [
  9. // ...
  10. ];
  11. $client = ClientBuilder::create()->build();
  12. $response = $client->indices()->snapshotIndex($params);

shrink()

  1. /*
  2. $params['index'] = (string) The name of the source index to shrink
  3. ['target'] = (string) The name of the target index to shrink into
  4. ['timeout'] = (time) Explicit operation timeout
  5. ['master_timeout'] = (time) Specify timeout for connection to master
  6. ['body'] = (array) Request body
  7. */
  8. $params = [
  9. // ...
  10. ];
  11. $client = ClientBuilder::create()->build();
  12. $response = $client->indices()->shrink($params);

getMapping()

  1. /*
  2. $params['index'] = (list) A comma-separated list of index names; use `_all` or empty string for all indices
  3. ['type'] = (list) A comma-separated list of document types
  4. ['body'] = (array) Request body
  5. */
  6. $params = [
  7. // ...
  8. ];
  9. $client = ClientBuilder::create()->build();
  10. $response = $client->indices()->getMapping($params);

getFieldMapping()

  1. /*
  2. $params['index'] = (list) A comma-separated list of index names; use `_all` or empty string for all indices
  3. ['type'] = (list) A comma-separated list of document types
  4. ['field'] = (list) A comma-separated list of document fields
  5. ['include_defaults'] = (bool) specifies default mapping values should be returned
  6. ['body'] = (array) Request body
  7. */
  8. $params = [
  9. // ...
  10. ];
  11. $client = ClientBuilder::create()->build();
  12. $response = $client->indices()->getFieldMapping($params);

flush()

  1. /*
  2. $params['index'] = (list) A comma-separated list of index names; use `_all` or empty string for all indices
  3. ['force'] = (boolean) TODO: ?
  4. ['full'] = (boolean) TODO: ?
  5. ['refresh'] = (boolean) Refresh the index after performing the operation
  6. ['ignore_unavailable'] = (bool) Whether specified concrete indices should be ignored when unavailable (missing or closed)
  7. ['allow_no_indices'] = (bool) Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
  8. ['expand_wildcards'] = (enum) Whether to expand wildcard expression to concrete indices that are open, closed or both.
  9. ['body'] = (array) Request body
  10. */
  11. $params = [
  12. // ...
  13. ];
  14. $client = ClientBuilder::create()->build();
  15. $response = $client->indices()->flush($params);

flushSynced()

  1. /*
  2. $params['index'] = (list) A comma-separated list of index names; use `_all` or empty string for all indices
  3. ['force'] = (boolean) TODO: ?
  4. ['full'] = (boolean) TODO: ?
  5. ['refresh'] = (boolean) Refresh the index after performing the operation
  6. ['ignore_unavailable'] = (bool) Whether specified concrete indices should be ignored when unavailable (missing or closed)
  7. ['allow_no_indices'] = (bool) Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
  8. ['expand_wildcards'] = (enum) Whether to expand wildcard expression to concrete indices that are open, closed or both.
  9. ['body'] = (array) Request body
  10. */
  11. $params = [
  12. // ...
  13. ];
  14. $client = ClientBuilder::create()->build();
  15. $response = $client->indices()->flushSynced($params);

refresh()

  1. /*
  2. $params['index'] = (list) A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices
  3. ['operation_threading'] = () TODO: ?
  4. ['ignore_unavailable'] = (bool) Whether specified concrete indices should be ignored when unavailable (missing or closed)
  5. ['allow_no_indices'] = (bool) Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
  6. ['expand_wildcards'] = (enum) Whether to expand wildcard expression to concrete indices that are open, closed or both.
  7. ['body'] = (array) Request body
  8. */
  9. $params = [
  10. // ...
  11. ];
  12. $client = ClientBuilder::create()->build();
  13. $response = $client->indices()->refresh($params);

recovery()

  1. /*
  2. $params['index'] = (list) A comma-separated list of index names; use `_all` or empty string for all indices
  3. ['detailed'] = (bool) Whether to display detailed information about shard recovery
  4. ['active_only'] = (bool) Display only those recoveries that are currently on-going
  5. ['human'] = (bool) Whether to return time and byte values in human-readable format.
  6. ['body'] = (array) Request body
  7. */
  8. $params = [
  9. // ...
  10. ];
  11. $client = ClientBuilder::create()->build();
  12. $response = $client->indices()->recovery($params);

existsType()

  1. /*
  2. $params['index'] = (list) A comma-separated list of index names; use `_all` to check the types across all indices (Required)
  3. ['type'] = (list) A comma-separated list of document types to check (Required)
  4. ['ignore_unavailable'] = (bool) Whether specified concrete indices should be ignored when unavailable (missing or closed)
  5. ['allow_no_indices'] = (bool) Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
  6. ['expand_wildcards'] = (enum) Whether to expand wildcard expression to concrete indices that are open, closed or both.
  7. ['body'] = (array) Request body
  8. */
  9. $params = [
  10. // ...
  11. ];
  12. $client = ClientBuilder::create()->build();
  13. $response = $client->indices()->existsType($params);

putAlias()

  1. /*
  2. $params['index'] = (string) The name of the index with an alias
  3. ['name'] = (string) The name of the alias to be created or updated
  4. ['timeout'] = (time) Explicit timestamp for the document
  5. ['body'] = (time) Explicit timestamp for the document
  6. ['body'] = (array) Request body
  7. */
  8. $params = [
  9. // ...
  10. ];
  11. $client = ClientBuilder::create()->build();
  12. $response = $client->indices()->putAlias($params);

putTemplate()

  1. /*
  2. $params['name'] = (string) The name of the template (Required)
  3. ['order'] = (number) The order for this template when merging multiple matching ones (higher numbers are merged later, overriding the lower numbers)
  4. ['timeout'] = (time) Explicit operation timeout
  5. ['body'] = (time) Explicit operation timeout
  6. ['create'] = (bool) Whether the index template should only be added if new or can also replace an existing one
  7. ['body'] = (array) Request body
  8. */
  9. $params = [
  10. // ...
  11. ];
  12. $client = ClientBuilder::create()->build();
  13. $response = $client->indices()->putTemplate($params);

validateQuery()

  1. /*
  2. $params['index'] = (list) A comma-separated list of index names to restrict the operation; use `_all` or empty string to perform the operation on all indices
  3. ['type'] = (list) A comma-separated list of document types to restrict the operation; leave empty to perform the operation on all types
  4. ['explain'] = (boolean) Return detailed information about the error
  5. ['ignore_indices'] = (enum) When performed on multiple indices, allows to ignore `missing` ones
  6. ['operation_threading'] = () TODO: ?
  7. ['source'] = (string) The URL-encoded query definition (instead of using the request body)
  8. ['body'] = (string) The URL-encoded query definition (instead of using the request body)
  9. ['body'] = (array) Request body
  10. */
  11. $params = [
  12. // ...
  13. ];
  14. $client = ClientBuilder::create()->build();
  15. $response = $client->indices()->validateQuery($params);

getAlias()

  1. /*
  2. $params['name'] = (list) A comma-separated list of alias names to return (Required)
  3. ['index'] = (list) A comma-separated list of index names to filter aliases
  4. ['ignore_indices'] = (enum) When performed on multiple indices, allows to ignore `missing` ones
  5. ['name'] = (list) A comma-separated list of alias names to return
  6. ['body'] = (array) Request body
  7. */
  8. $params = [
  9. // ...
  10. ];
  11. $client = ClientBuilder::create()->build();
  12. $response = $client->indices()->getAlias($params);

putMapping()

  1. /*
  2. $params['index'] = (list) A comma-separated list of index names; use `_all` to perform the operation on all indices (Required)
  3. ['type'] = (string) The name of the document type
  4. ['ignore_conflicts'] = (boolean) Specify whether to ignore conflicts while updating the mapping (default: false)
  5. ['timeout'] = (time) Explicit operation timeout
  6. ['body'] = (time) Explicit operation timeout
  7. ['body'] = (array) Request body
  8. */
  9. $params = [
  10. // ...
  11. ];
  12. $client = ClientBuilder::create()->build();
  13. $response = $client->indices()->putMapping($params);

deleteMapping()

  1. /*
  2. $params['index'] = (list) A comma-separated list of index names; use `_all` for all indices (Required)
  3. ['type'] = (string) The name of the document type to delete (Required)
  4. ['body'] = (array) Request body
  5. */
  6. $params = [
  7. // ...
  8. ];
  9. $client = ClientBuilder::create()->build();
  10. $response = $client->indices()->deleteMapping($params);

getTemplate()

  1. /*
  2. $params['name'] = (string) The name of the template (Required)
  3. ['body'] = (array) Request body
  4. */
  5. $params = [
  6. // ...
  7. ];
  8. $client = ClientBuilder::create()->build();
  9. $response = $client->indices()->getTemplate($params);

existsTemplate()

  1. /*
  2. $params['name'] = (string) The name of the template (Required)
  3. ['body'] = (array) Request body
  4. */
  5. $params = [
  6. // ...
  7. ];
  8. $client = ClientBuilder::create()->build();
  9. $response = $client->indices()->existsTemplate($params);

create()

  1. /*
  2. $params['index'] = (string) The name of the index (Required)
  3. ['timeout'] = (time) Explicit operation timeout
  4. ['body'] = (time) Explicit operation timeout
  5. ['body'] = (array) Request body
  6. */
  7. $params = [
  8. // ...
  9. ];
  10. $client = ClientBuilder::create()->build();
  11. $response = $client->indices()->create($params);

forceMerge()

  1. /*
  2. $params['index'] = (list) A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices
  3. ['flush'] = (boolean) Specify whether the index should be flushed after performing the operation (default: true)
  4. ['max_num_segments'] = (number) The number of segments the index should be merged into (default: dynamic)
  5. ['only_expunge_deletes'] = (boolean) Specify whether the operation should only expunge deleted documents
  6. ['operation_threading'] = () TODO: ?
  7. ['refresh'] = (boolean) Specify whether the index should be refreshed after performing the operation (default: true)
  8. ['wait_for_merge'] = (boolean) Specify whether the request should block until the merge process is finished (default: true)
  9. ['ignore_unavailable'] = (bool) Whether specified concrete indices should be ignored when unavailable (missing or closed)
  10. ['allow_no_indices'] = (bool) Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
  11. ['expand_wildcards'] = (enum) Whether to expand wildcard expression to concrete indices that are open, closed or both.
  12. ['body'] = (array) Request body
  13. */
  14. $params = [
  15. // ...
  16. ];
  17. $client = ClientBuilder::create()->build();
  18. $response = $client->indices()->forceMerge($params);

deleteAlias()

  1. /*
  2. $params['index'] = (string) The name of the index with an alias (Required)
  3. ['name'] = (string) The name of the alias to be deleted (Required)
  4. ['timeout'] = (time) Explicit timestamp for the document
  5. ['body'] = (array) Request body
  6. */
  7. $params = [
  8. // ...
  9. ];
  10. $client = ClientBuilder::create()->build();
  11. $response = $client->indices()->deleteAlias($params);

open()

  1. /*
  2. $params['index'] = (string) The name of the index (Required)
  3. ['timeout'] = (time) Explicit operation timeout
  4. ['body'] = (array) Request body
  5. */
  6. $params = [
  7. // ...
  8. ];
  9. $client = ClientBuilder::create()->build();
  10. $response = $client->indices()->open($params);

analyze()

  1. /*
  2. $params['index'] = (string) The name of the index to scope the operation
  3. ['analyzer'] = (string) The name of the analyzer to use
  4. ['field'] = (string) Use the analyzer configured for this field (instead of passing the analyzer name)
  5. ['filter'] = (list) A comma-separated list of filters to use for the analysis
  6. ['prefer_local'] = (boolean) With `true`, specify that a local shard should be used if available, with `false`, use a random shard (default: true)
  7. ['text'] = (string) The text on which the analysis should be performed (when request body is not used)
  8. ['tokenizer'] = (string) The name of the tokenizer to use for the analysis
  9. ['format'] = (enum) Format of the output
  10. ['body'] = (enum) Format of the output
  11. ['char_filter'] = (list) A comma-separated list of character filters to use for the analysis
  12. ['explain'] = (bool) With `true`, outputs more advanced details. (default: false)
  13. ['attributes'] = (list) A comma-separated list of token attributes to output, this parameter works only with `explain=true`
  14. ['format'] = (enum) Format of the output (["detailed", "text"])
  15. ['body'] = (array) Request body
  16. */
  17. $params = [
  18. // ...
  19. ];
  20. $client = ClientBuilder::create()->build();
  21. $response = $client->indices()->analyze($params);

clearCache()

  1. /*
  2. $params['index'] = (list) A comma-separated list of index name to limit the operation
  3. ['field_data'] = (boolean) Clear field data
  4. ['fielddata'] = (boolean) Clear field data
  5. ['fields'] = (list) A comma-separated list of fields to clear when using the `field_data` parameter (default: all)
  6. ['filter'] = (boolean) Clear filter caches
  7. ['filter_cache'] = (boolean) Clear filter caches
  8. ['filter_keys'] = (boolean) A comma-separated list of keys to clear when using the `filter_cache` parameter (default: all)
  9. ['id'] = (boolean) Clear ID caches for parent/child
  10. ['id_cache'] = (boolean) Clear ID caches for parent/child
  11. ['recycler'] = (boolean) Clear the recycler cache
  12. ['ignore_unavailable'] = (bool) Whether specified concrete indices should be ignored when unavailable (missing or closed)
  13. ['allow_no_indices'] = (bool) Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
  14. ['expand_wildcards'] = (enum) Whether to expand wildcard expression to concrete indices that are open, closed or both.
  15. ['body'] = (array) Request body
  16. */
  17. $params = [
  18. // ...
  19. ];
  20. $client = ClientBuilder::create()->build();
  21. $response = $client->indices()->clearCache($params);

updateAliases()

  1. /*
  2. $params['index'] = (list) A comma-separated list of index names to filter aliases
  3. ['timeout'] = (time) Explicit timestamp for the document
  4. ['body'] = (time) Explicit timestamp for the document
  5. ['body'] = (array) Request body
  6. */
  7. $params = [
  8. // ...
  9. ];
  10. $client = ClientBuilder::create()->build();
  11. $response = $client->indices()->updateAliases($params);

getAliases()

  1. /*
  2. $params['local'] = (bool) Return local information, do not retrieve the state from master node (default: false)
  3. ['timeout'] = (time) Explicit timestamp for the document
  4. ['body'] = (array) Request body
  5. */
  6. $params = [
  7. // ...
  8. ];
  9. $client = ClientBuilder::create()->build();
  10. $response = $client->indices()->getAliases($params);

existsAlias()

  1. /*
  2. $params['name'] = (list) A comma-separated list of alias names to return (Required)
  3. ['index'] = (list) A comma-separated list of index names to filter aliases
  4. ['ignore_unavailable'] = (bool) Whether specified concrete indices should be ignored when unavailable (missing or closed)
  5. ['allow_no_indices'] = (bool) Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
  6. ['expand_wildcards'] = (enum) Whether to expand wildcard expression to concrete indices that are open, closed or both.
  7. ['body'] = (array) Request body
  8. */
  9. $params = [
  10. // ...
  11. ];
  12. $client = ClientBuilder::create()->build();
  13. $response = $client->indices()->existsAlias($params);

status()

  1. /*
  2. $params['index'] = (list) A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices
  3. ['ignore_indices'] = (enum) When performed on multiple indices, allows to ignore `missing` ones
  4. ['operation_threading'] = () TODO: ?
  5. ['recovery'] = (boolean) Return information about shard recovery
  6. ['snapshot'] = (boolean) TODO: ?
  7. ['body'] = (array) Request body
  8. */
  9. $params = [
  10. // ...
  11. ];
  12. $client = ClientBuilder::create()->build();
  13. $response = $client->indices()->status($params);

getSettings()

  1. /*
  2. $params['index'] = (list) A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices
  3. ['body'] = (array) Request body
  4. */
  5. $params = [
  6. // ...
  7. ];
  8. $client = ClientBuilder::create()->build();
  9. $response = $client->indices()->getSettings($params);

close()

  1. /*
  2. $params['index'] = (string) The name of the index (Required)
  3. ['timeout'] = (time) Explicit operation timeout
  4. ['body'] = (array) Request body
  5. */
  6. $params = [
  7. // ...
  8. ];
  9. $client = ClientBuilder::create()->build();
  10. $response = $client->indices()->close($params);

seal()

  1. /*
  2. $params['index'] = (string) The name of the index
  3. ['body'] = (array) Request body
  4. */
  5. $params = [
  6. // ...
  7. ];
  8. $client = ClientBuilder::create()->build();
  9. $response = $client->indices()->seal($params);

upgrade()

  1. /*
  2. $params['index'] = (list) A comma-separated list of index names; use `_all` or empty string for all indices
  3. ['wait_for_completion']= (boolean) Specify whether the request should block until the all segments are upgraded (default: false)
  4. ['only_ancient_segments'] = (boolean) If true, only ancient (an older Lucene major release) segments will be upgraded
  5. ['refresh'] = (boolean) Refresh the index after performing the operation
  6. ['ignore_unavailable'] = (bool) Whether specified concrete indices should be ignored when unavailable (missing or closed)
  7. ['allow_no_indices'] = (bool) Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
  8. ['expand_wildcards'] = (enum) Whether to expand wildcard expression to concrete indices that are open, closed or both.
  9. ['body'] = (array) Request body
  10. */
  11. $params = [
  12. // ...
  13. ];
  14. $client = ClientBuilder::create()->build();
  15. $response = $client->indices()->upgrade($params);

getUpgrade()

  1. /*
  2. $params['index'] = (list) A comma-separated list of index names; use `_all` or empty string for all indices
  3. ['wait_for_completion']= (boolean) Specify whether the request should block until the all segments are upgraded (default: false)
  4. ['only_ancient_segments'] = (boolean) If true, only ancient (an older Lucene major release) segments will be upgraded
  5. ['refresh'] = (boolean) Refresh the index after performing the operation
  6. ['ignore_unavailable'] = (bool) Whether specified concrete indices should be ignored when unavailable (missing or closed)
  7. ['allow_no_indices'] = (bool) Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
  8. ['expand_wildcards'] = (enum) Whether to expand wildcard expression to concrete indices that are open, closed or both.
  9. ['body'] = (array) Request body
  10. */
  11. $params = [
  12. // ...
  13. ];
  14. $client = ClientBuilder::create()->build();
  15. $response = $client->indices()->getUpgrade($params);

shardStores()

  1. /*
  2. $params['index'] = (string) A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices
  3. ['status'] = (list) A comma-separated list of statuses used to filter on shards to get store information for
  4. ['ignore_unavailable'] = (boolean) Whether specified concrete indices should be ignored when unavailable (missing or closed)
  5. ['allow_no_indices'] = (boolean) Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes `_all` string or when no indices have been specified)
  6. ['expand_wildcards'] = (boolean) Whether to expand wildcard expression to concrete indices that are open, closed or both.
  7. ['body'] = (array) Request body
  8. */
  9. $params = [
  10. // ...
  11. ];
  12. $client = ClientBuilder::create()->build();
  13. $response = $client->indices()->shardStores($params);

rollover()

  1. /*
  2. $params['newIndex'] = (string) The name of the rollover index
  3. ['alias'] = (string) The name of the alias to rollover
  4. ['timeout'] = (time) Explicit operation timeout
  5. ['master_timeout'] = (time) Specify timeout for connection to master
  6. ['body'] = (array) Request body
  7. */
  8. $params = [
  9. // ...
  10. ];
  11. $client = ClientBuilder::create()->build();
  12. $response = $client->indices()->rollover($params);

Elasticsearch\Namespaces\IngestNamespace

Class IngestNamespace

Methods

The class defines the following methods:

deletePipeline()

  1. /*
  2. $params['master_timeout'] = (time) Explicit operation timeout for connection to master node
  3. ['timeout'] = (time) Explicit operation timeout
  4. ['body'] = (array) Request body
  5. */
  6. $params = [
  7. // ...
  8. ];
  9. $client = ClientBuilder::create()->build();
  10. $response = $client->ingest()->deletePipeline($params);

getPipeline()

  1. /*
  2. $params['master_timeout'] = (time) Explicit operation timeout for connection to master node
  3. ['body'] = (array) Request body
  4. */
  5. $params = [
  6. // ...
  7. ];
  8. $client = ClientBuilder::create()->build();
  9. $response = $client->ingest()->getPipeline($params);

putPipeline()

  1. /*
  2. $params['master_timeout'] = (time) Explicit operation timeout for connection to master node
  3. ['timeout'] = (time) Explicit operation timeout
  4. ['body'] = (array) Request body
  5. */
  6. $params = [
  7. // ...
  8. ];
  9. $client = ClientBuilder::create()->build();
  10. $response = $client->ingest()->putPipeline($params);

simulate()

  1. /*
  2. $params['verbose'] = (bool) Verbose mode. Display data output for each processor in executed pipeline
  3. ['body'] = (array) Request body
  4. */
  5. $params = [
  6. // ...
  7. ];
  8. $client = ClientBuilder::create()->build();
  9. $response = $client->ingest()->simulate($params);

processorGrok()

  1. /*
  2. $params[]
  3. ['body'] = (array) Request body
  4. */
  5. $params = [
  6. // ...
  7. ];
  8. $client = ClientBuilder::create()->build();
  9. $response = $client->ingest()->processorGrok($params);

Elasticsearch\Namespaces\NodesNamespace

Class NodesNamespace

Methods

The class defines the following methods:

stats()

  1. /*
  2. $params['fields'] = (list) A comma-separated list of fields for `fielddata` metric (supports wildcards)
  3. ['metric_family'] = (enum) Limit the information returned to a certain metric family
  4. ['metric'] = (enum) Limit the information returned for `indices` family to a specific metric
  5. ['node_id'] = (list) A comma-separated list of node IDs or names to limit the returned information; use `_local` to return information from the node you're connecting to, leave empty to get information from all nodes
  6. ['all'] = (boolean) Return all available information
  7. ['clear'] = (boolean) Reset the default level of detail
  8. ['fs'] = (boolean) Return information about the filesystem
  9. ['http'] = (boolean) Return information about HTTP
  10. ['indices'] = (boolean) Return information about indices
  11. ['jvm'] = (boolean) Return information about the JVM
  12. ['network'] = (boolean) Return information about network
  13. ['os'] = (boolean) Return information about the operating system
  14. ['process'] = (boolean) Return information about the Elasticsearch process
  15. ['thread_pool'] = (boolean) Return information about the thread pool
  16. ['transport'] = (boolean) Return information about transport
  17. ['body'] = (array) Request body
  18. */
  19. $params = [
  20. // ...
  21. ];
  22. $client = ClientBuilder::create()->build();
  23. $response = $client->nodes()->stats($params);

info()

  1. /*
  2. $params['node_id'] = (list) A comma-separated list of node IDs or names to limit the returned information; use `_local` to return information from the node you're connecting to, leave empty to get information from all nodes
  3. ['metric'] = (list) A comma-separated list of metrics you wish returned. Leave empty to return all.
  4. ['body'] = (array) Request body
  5. */
  6. $params = [
  7. // ...
  8. ];
  9. $client = ClientBuilder::create()->build();
  10. $response = $client->nodes()->info($params);

hotThreads()

  1. /*
  2. $params['node_id'] = (list) A comma-separated list of node IDs or names to limit the returned information; use `_local` to return information from the node you're connecting to, leave empty to get information from all nodes
  3. ['interval'] = (time) The interval for the second sampling of threads
  4. ['snapshots'] = (number) Number of samples of thread stacktrace (default: 10)
  5. ['threads'] = (number) Specify the number of threads to provide information for (default: 3)
  6. ['type'] = (enum) The type to sample (default: cpu)
  7. ['body'] = (array) Request body
  8. */
  9. $params = [
  10. // ...
  11. ];
  12. $client = ClientBuilder::create()->build();
  13. $response = $client->nodes()->hotThreads($params);

shutdown()

  1. /*
  2. $params['node_id'] = (list) A comma-separated list of node IDs or names to perform the operation on; use `_local` to perform the operation on the node you're connected to, leave empty to perform the operation on all nodes
  3. ['delay'] = (time) Set the delay for the operation (default: 1s)
  4. ['exit'] = (boolean) Exit the JVM as well (default: true)
  5. ['body'] = (array) Request body
  6. */
  7. $params = [
  8. // ...
  9. ];
  10. $client = ClientBuilder::create()->build();
  11. $response = $client->nodes()->shutdown($params);

Elasticsearch\Namespaces\RemoteNamespace

Class RemoteNamespace

Methods

The class defines the following methods:

info()

  1. /*
  2. */
  3. $params = [
  4. // ...
  5. ];
  6. $client = ClientBuilder::create()->build();
  7. $response = $client->remote()->info($params);

Elasticsearch\Namespaces\SnapshotNamespace

Class SnapshotNamespace

Methods

The class defines the following methods:

create()

  1. /*
  2. $params['master_timeout'] = (time) Explicit operation timeout for connection to master node
  3. ['wait_for_completion'] = (bool) Should this request wait until the operation has completed before returning
  4. ['body'] = (array) Request body
  5. */
  6. $params = [
  7. // ...
  8. ];
  9. $client = ClientBuilder::create()->build();
  10. $response = $client->snapshot()->create($params);

createRepository()

  1. /*
  2. $params['master_timeout'] = (time) Explicit operation timeout for connection to master node
  3. ['timeout'] = (time) Explicit operation timeout
  4. ['body'] = (array) Request body
  5. */
  6. $params = [
  7. // ...
  8. ];
  9. $client = ClientBuilder::create()->build();
  10. $response = $client->snapshot()->createRepository($params);

delete()

  1. /*
  2. $params['master_timeout'] = (time) Explicit operation timeout for connection to master node
  3. ['body'] = (array) Request body
  4. */
  5. $params = [
  6. // ...
  7. ];
  8. $client = ClientBuilder::create()->build();
  9. $response = $client->snapshot()->delete($params);

deleteRepository()

  1. /*
  2. $params['master_timeout'] = (time) Explicit operation timeout for connection to master node
  3. ['timeout'] = (time) Explicit operation timeout
  4. ['body'] = (array) Request body
  5. */
  6. $params = [
  7. // ...
  8. ];
  9. $client = ClientBuilder::create()->build();
  10. $response = $client->snapshot()->deleteRepository($params);

get()

  1. /*
  2. $params['master_timeout'] = (time) Explicit operation timeout for connection to master node
  3. ['body'] = (array) Request body
  4. */
  5. $params = [
  6. // ...
  7. ];
  8. $client = ClientBuilder::create()->build();
  9. $response = $client->snapshot()->get($params);

getRepository()

  1. /*
  2. $params['master_timeout'] = (time) Explicit operation timeout for connection to master node
  3. ['timeout'] = (time) Explicit operation timeout
  4. ['body'] = (array) Request body
  5. */
  6. $params = [
  7. // ...
  8. ];
  9. $client = ClientBuilder::create()->build();
  10. $response = $client->snapshot()->getRepository($params);

restore()

  1. /*
  2. $params['master_timeout'] = (time) Explicit operation timeout for connection to master node
  3. ['wait_for_completion'] = (bool) Should this request wait until the operation has completed before returning
  4. ['body'] = (array) Request body
  5. */
  6. $params = [
  7. // ...
  8. ];
  9. $client = ClientBuilder::create()->build();
  10. $response = $client->snapshot()->restore($params);

status()

  1. /*
  2. $params['master_timeout'] = (time) Explicit operation timeout for connection to master node
  3. ['body'] = (array) Request body
  4. */
  5. $params = [
  6. // ...
  7. ];
  8. $client = ClientBuilder::create()->build();
  9. $response = $client->snapshot()->status($params);

verifyRepository()

  1. /*
  2. $params['master_timeout'] = (time) Explicit operation timeout for connection to master node
  3. ['timeout'] = (time) Explicit operation timeout
  4. ['body'] = (array) Request body
  5. */
  6. $params = [
  7. // ...
  8. ];
  9. $client = ClientBuilder::create()->build();
  10. $response = $client->snapshot()->verifyRepository($params);

Elasticsearch\Namespaces\TasksNamespace

Class TasksNamespace

Methods

The class defines the following methods:

get()

  1. /*
  2. $params['wait_for_completion'] = (bool) Wait for the matching tasks to complete (default: false)
  3. ['body'] = (array) Request body
  4. */
  5. $params = [
  6. // ...
  7. ];
  8. $client = ClientBuilder::create()->build();
  9. $response = $client->tasks()->get($params);

tasksList()

  1. /*
  2. $params['node_id'] = (list) A comma-separated list of node IDs or names to limit the returned information; use `_local` to return information from the node you're connecting to, leave empty to get information from all nodes
  3. ['actions'] = (list) A comma-separated list of actions that should be cancelled. Leave empty to cancel all.
  4. ['body'] = (array) Request body
  5. */
  6. $params = [
  7. // ...
  8. ];
  9. $client = ClientBuilder::create()->build();
  10. $response = $client->tasks()->tasksList($params);

cancel()

  1. /*
  2. $params['node_id'] = (list) A comma-separated list of node IDs or names to limit the returned information; use `_local` to return information from the node you're connecting to, leave empty to get information from all nodes
  3. ['actions'] = (list) A comma-separated list of actions that should be cancelled. Leave empty to cancel all.
  4. ['body'] = (array) Request body
  5. */
  6. $params = [
  7. // ...
  8. ];
  9. $client = ClientBuilder::create()->build();
  10. $response = $client->tasks()->cancel($params);