Merge pull request #2 from spenceralger/master
Documentation improvements, dep management
This commit is contained in:
23
Gruntfile.js
23
Gruntfile.js
@ -158,24 +158,12 @@ module.exports = function (grunt) {
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
mocha: {
|
||||
yaml_suite: {
|
||||
options: {
|
||||
// log: true,
|
||||
run: true,
|
||||
urls: [ 'http://localhost:8888' ],
|
||||
timeout: 10e3,
|
||||
'--web-security': false
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
// load plugins
|
||||
grunt.loadNpmTasks('grunt-run');
|
||||
grunt.loadNpmTasks('grunt-open');
|
||||
grunt.loadNpmTasks('grunt-mocha');
|
||||
grunt.loadNpmTasks('grunt-browserify');
|
||||
grunt.loadNpmTasks('grunt-mocha-test');
|
||||
grunt.loadNpmTasks('grunt-contrib-clean');
|
||||
@ -188,11 +176,9 @@ module.exports = function (grunt) {
|
||||
grunt.registerTask('default', [
|
||||
/*jshint scripturl:true*/
|
||||
'jshint',
|
||||
'mochaTest:unit',
|
||||
'build',
|
||||
'mochaTest:yaml_suite',
|
||||
// 'start:integration_server',
|
||||
// 'mocha:yaml_suite' -- this will fail because of the way that PhantomJS handle's DELETE requests with body's
|
||||
'mochaTest:unit',
|
||||
'mochaTest:yaml_suite'
|
||||
]);
|
||||
|
||||
grunt.registerTask('build', [
|
||||
@ -227,6 +213,11 @@ module.exports = function (grunt) {
|
||||
|
||||
var taskData = this.data;
|
||||
|
||||
/**
|
||||
* You must always run the build task first, to ensure that the lastest API and yaml tests are available.
|
||||
* This is run in the default and browser_tests:{{browser}} tests.
|
||||
*/
|
||||
grunt.task.requires('build');
|
||||
grunt.task.requires('run:integration_server');
|
||||
|
||||
grunt.config.set('open.yaml_suite_' + this.target, {
|
||||
|
||||
16
README.md
16
README.md
@ -5,7 +5,7 @@ Official *low-level* client for Elasticsearch.
|
||||
## Features
|
||||
|
||||
- One-to-one mapping with REST API and other language clients
|
||||
- Generalized, pluggable architecture. See [replacing core components](TODO: details the peices that are replaceable)
|
||||
- Generalized, pluggable architecture. See [replacing core components](docs/replacing_core_components.md)
|
||||
- Configurable, automatic discovery of cluster nodes
|
||||
- Persistent, Keep-Alive connections
|
||||
- Load balancing (with pluggable selection strategy) across all available nodes.
|
||||
@ -59,6 +59,14 @@ bower install elasticsearch-angular
|
||||
bower install elasticsearch-jquery
|
||||
```
|
||||
|
||||
## Docs
|
||||
- [Configuration](#configuration)
|
||||
- [API](docs/api.md)
|
||||
- [Replacing Core Components](docs/replacing_core_components.md)
|
||||
- [Errors](docs/errors.md)
|
||||
- [Setting Up Logging](docs/setting_up_logging.md)
|
||||
- [FAQ](#faq)
|
||||
|
||||
## Configuration
|
||||
|
||||
The `Client` constructor accepts a single object as it's argument, and the following keys can be used to configure that client instance:
|
||||
@ -95,7 +103,7 @@ log: {
|
||||
}
|
||||
```
|
||||
|
||||
Unless a constructor is specified, this sets the output settings for the bundled logger. See [setting up logging](TODO: detail logging why) for more information.
|
||||
Unless a constructor is specified, this sets the output settings for the bundled logger. See [setting up logging](docs/setting_up_logging.md) for more information.
|
||||
|
||||
### connectionClass
|
||||
Type: `String`, `Constructor`
|
||||
@ -148,7 +156,7 @@ Type: `Number`
|
||||
|
||||
Defailt: `3`
|
||||
|
||||
How many times should the client try to connect to other nodes before returning a [ConnectionFault](TODO: error types) error. (see [node death](#node-death))
|
||||
How many times should the client try to connect to other nodes before returning a [ConnectionFault](docs/error.md#connectionfault) error. (see [node death](#node-death))
|
||||
|
||||
### timeout
|
||||
Type: `Number`
|
||||
@ -202,7 +210,7 @@ The number of milliseconds this request has to complete. It defaults to the time
|
||||
|
||||
### Methods
|
||||
|
||||
All the methods can be seen [here](TODO: api docs), or take a look at [api.js](src/lib/api.js).
|
||||
All the methods can be seen [here](docs/api.md), or take a look at [api.js](src/lib/api.js).
|
||||
|
||||
### Examples
|
||||
|
||||
|
||||
16061
dist/elasticsearch.angular.js
vendored
16061
dist/elasticsearch.angular.js
vendored
File diff suppressed because it is too large
Load Diff
9
dist/elasticsearch.angular.min.js
vendored
9
dist/elasticsearch.angular.min.js
vendored
File diff suppressed because one or more lines are too long
16065
dist/elasticsearch.js
vendored
16065
dist/elasticsearch.js
vendored
File diff suppressed because it is too large
Load Diff
9
dist/elasticsearch.min.js
vendored
9
dist/elasticsearch.min.js
vendored
File diff suppressed because one or more lines are too long
978
docs/api.md
Normal file
978
docs/api.md
Normal file
@ -0,0 +1,978 @@
|
||||
# API
|
||||
|
||||
## Table Of Contents
|
||||
|
||||
|
||||
- [bulk](#bulk)
|
||||
- [clearScroll](#clearscroll)
|
||||
- [cluster.getSettings](#clustergetsettings)
|
||||
- [cluster.health](#clusterhealth)
|
||||
- [cluster.nodeHotThreads](#clusternodehotthreads)
|
||||
- [cluster.nodeInfo](#clusternodeinfo)
|
||||
- [cluster.nodeShutdown](#clusternodeshutdown)
|
||||
- [cluster.nodeStats](#clusternodestats)
|
||||
- [cluster.putSettings](#clusterputsettings)
|
||||
- [cluster.reroute](#clusterreroute)
|
||||
- [cluster.state](#clusterstate)
|
||||
- [count](#count)
|
||||
- [create](#create)
|
||||
- [delete](#delete)
|
||||
- [deleteByQuery](#deletebyquery)
|
||||
- [exists](#exists)
|
||||
- [explain](#explain)
|
||||
- [get](#get)
|
||||
- [getSource](#getsource)
|
||||
- [index](#index)
|
||||
- [indices.analyze](#indicesanalyze)
|
||||
- [indices.clearCache](#indicesclearcache)
|
||||
- [indices.close](#indicesclose)
|
||||
- [indices.create](#indicescreate)
|
||||
- [indices.delete](#indicesdelete)
|
||||
- [indices.deleteAlias](#indicesdeletealias)
|
||||
- [indices.deleteMapping](#indicesdeletemapping)
|
||||
- [indices.deleteTemplate](#indicesdeletetemplate)
|
||||
- [indices.deleteWarmer](#indicesdeletewarmer)
|
||||
- [indices.exists](#indicesexists)
|
||||
- [indices.existsAlias](#indicesexistsalias)
|
||||
- [indices.existsType](#indicesexiststype)
|
||||
- [indices.flush](#indicesflush)
|
||||
- [indices.getAlias](#indicesgetalias)
|
||||
- [indices.getAliases](#indicesgetaliases)
|
||||
- [indices.getFieldMapping](#indicesgetfieldmapping)
|
||||
- [indices.getMapping](#indicesgetmapping)
|
||||
- [indices.getSettings](#indicesgetsettings)
|
||||
- [indices.getTemplate](#indicesgettemplate)
|
||||
- [indices.getWarmer](#indicesgetwarmer)
|
||||
- [indices.open](#indicesopen)
|
||||
- [indices.optimize](#indicesoptimize)
|
||||
- [indices.putAlias](#indicesputalias)
|
||||
- [indices.putMapping](#indicesputmapping)
|
||||
- [indices.putSettings](#indicesputsettings)
|
||||
- [indices.putTemplate](#indicesputtemplate)
|
||||
- [indices.putWarmer](#indicesputwarmer)
|
||||
- [indices.refresh](#indicesrefresh)
|
||||
- [indices.segments](#indicessegments)
|
||||
- [indices.snapshotIndex](#indicessnapshotindex)
|
||||
- [indices.stats](#indicesstats)
|
||||
- [indices.status](#indicesstatus)
|
||||
- [indices.updateAliases](#indicesupdatealiases)
|
||||
- [indices.validateQuery](#indicesvalidatequery)
|
||||
- [info](#info)
|
||||
- [mget](#mget)
|
||||
- [mlt](#mlt)
|
||||
- [msearch](#msearch)
|
||||
- [percolate](#percolate)
|
||||
- [scroll](#scroll)
|
||||
- [search](#search)
|
||||
- [suggest](#suggest)
|
||||
- [update](#update)
|
||||
|
||||
### bulk()
|
||||
|
||||
http://elasticsearch.org/guide/reference/api/bulk/
|
||||
|
||||
| Name | Type | Description |
|
||||
| ---- | ---- | ----------- |
|
||||
|`consistency` | String | Explicit write consistency setting for the operation|
|
||||
|`refresh` | Boolean | Refresh the index after performing the operation|
|
||||
|`[replication=sync]` | String | Explicitely set the replication type|
|
||||
|`type` | String | Default document type for items which don't provide one|
|
||||
|`index` | String | Default index for items which don't provide one|
|
||||
|
||||
|
||||
### clearScroll()
|
||||
|
||||
http://www.elasticsearch.org/guide/reference/api/search/scroll/
|
||||
|
||||
| Name | Type | Description |
|
||||
| ---- | ---- | ----------- |
|
||||
|`scrollId` | String or String[] or Boolean | A comma-separated list of scroll IDs to clear|
|
||||
|
||||
|
||||
### cluster.getSettings()
|
||||
|
||||
http://elasticsearch.org/guide/reference/api/admin-cluster-update-settings/
|
||||
|
||||
| Name | Type | Description |
|
||||
| ---- | ---- | ----------- |
|
||||
|
||||
|
||||
### cluster.health()
|
||||
|
||||
http://elasticsearch.org/guide/reference/api/admin-cluster-health/
|
||||
|
||||
| Name | Type | Description |
|
||||
| ---- | ---- | ----------- |
|
||||
|`[level=cluster]` | String | Specify the level of detail for returned information|
|
||||
|`local` | Boolean | Return local information, do not retrieve the state from master node (default: false)|
|
||||
|`masterTimeout` | Date or Number | Explicit operation timeout for connection to master node|
|
||||
|`timeout` | Date or Number | Explicit operation timeout|
|
||||
|`waitForActiveShards` | Number | Wait until the specified number of shards is active|
|
||||
|`waitForNodes` | String | Wait until the specified number of nodes is available|
|
||||
|`waitForRelocatingShards` | Number | Wait until the specified number of relocating shards is finished|
|
||||
|`waitForStatus` | String | Wait until cluster is in a specific state|
|
||||
|`index` | String | Limit the information returned to a specific index|
|
||||
|
||||
|
||||
### cluster.nodeHotThreads()
|
||||
|
||||
http://www.elasticsearch.org/guide/reference/api/admin-cluster-nodes-hot-threads/
|
||||
|
||||
| Name | Type | Description |
|
||||
| ---- | ---- | ----------- |
|
||||
|`interval` | Date or Number | The interval for the second sampling of threads|
|
||||
|`snapshots` | Number | Number of samples of thread stacktrace (default: 10)|
|
||||
|`threads` | Number | Specify the number of threads to provide information for (default: 3)|
|
||||
|`type` | String | The type to sample (default: cpu)|
|
||||
|`nodeId` | String or String[] or Boolean | 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|
|
||||
|
||||
|
||||
### cluster.nodeInfo()
|
||||
|
||||
http://elasticsearch.org/guide/reference/api/admin-cluster-nodes-info/
|
||||
|
||||
| Name | Type | Description |
|
||||
| ---- | ---- | ----------- |
|
||||
|`all` | Boolean | Return all available information|
|
||||
|`clear` | Boolean | Reset the default settings|
|
||||
|`http` | Boolean | Return information about HTTP|
|
||||
|`jvm` | Boolean | Return information about the JVM|
|
||||
|`network` | Boolean | Return information about network|
|
||||
|`os` | Boolean | Return information about the operating system|
|
||||
|`plugin` | Boolean | Return information about plugins|
|
||||
|`process` | Boolean | Return information about the Elasticsearch process|
|
||||
|`settings` | Boolean | Return information about node settings|
|
||||
|`threadPool` | Boolean | Return information about the thread pool|
|
||||
|`timeout` | Date or Number | Explicit operation timeout|
|
||||
|`transport` | Boolean | Return information about transport|
|
||||
|`nodeId` | String or String[] or Boolean | 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|
|
||||
|
||||
|
||||
### cluster.nodeShutdown()
|
||||
|
||||
http://elasticsearch.org/guide/reference/api/admin-cluster-nodes-shutdown/
|
||||
|
||||
| Name | Type | Description |
|
||||
| ---- | ---- | ----------- |
|
||||
|`delay` | Date or Number | Set the delay for the operation (default: 1s)|
|
||||
|`exit` | Boolean | Exit the JVM as well (default: true)|
|
||||
|`nodeId` | String or String[] or Boolean | 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|
|
||||
|
||||
|
||||
### cluster.nodeStats()
|
||||
|
||||
http://elasticsearch.org/guide/reference/api/admin-cluster-nodes-stats/
|
||||
|
||||
| Name | Type | Description |
|
||||
| ---- | ---- | ----------- |
|
||||
|`all` | Boolean | Return all available information|
|
||||
|`clear` | Boolean | Reset the default level of detail|
|
||||
|`fields` | String or String[] or Boolean | A comma-separated list of fields to return detailed information for, when returning the `indices` metric family (supports wildcards)|
|
||||
|`fs` | Boolean | Return information about the filesystem|
|
||||
|`http` | Boolean | Return information about HTTP|
|
||||
|`indices` | Boolean | Return information about indices|
|
||||
|`jvm` | Boolean | Return information about the JVM|
|
||||
|`network` | Boolean | Return information about network|
|
||||
|`os` | Boolean | Return information about the operating system|
|
||||
|`process` | Boolean | Return information about the Elasticsearch process|
|
||||
|`threadPool` | Boolean | Return information about the thread pool|
|
||||
|`transport` | Boolean | Return information about transport|
|
||||
|`metricFamily` | String | Limit the information returned to a certain metric family|
|
||||
|`metric` | String | Limit the information returned for `indices` family to a specific metric|
|
||||
|`nodeId` | String or String[] or Boolean | 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|
|
||||
|
||||
|
||||
### cluster.putSettings()
|
||||
|
||||
http://elasticsearch.org/guide/reference/api/admin-cluster-update-settings/
|
||||
|
||||
| Name | Type | Description |
|
||||
| ---- | ---- | ----------- |
|
||||
|
||||
|
||||
### cluster.reroute()
|
||||
|
||||
http://elasticsearch.org/guide/reference/api/admin-cluster-reroute/
|
||||
|
||||
| Name | Type | Description |
|
||||
| ---- | ---- | ----------- |
|
||||
|`dryRun` | Boolean | Simulate the operation only and return the resulting state|
|
||||
|`filterMetadata` | Boolean | Don't return cluster state metadata (default: false)|
|
||||
|
||||
|
||||
### cluster.state()
|
||||
|
||||
http://elasticsearch.org/guide/reference/api/admin-cluster-state/
|
||||
|
||||
| Name | Type | Description |
|
||||
| ---- | ---- | ----------- |
|
||||
|`filterBlocks` | Boolean | Do not return information about blocks|
|
||||
|`filterIndexTemplates` | Boolean | Do not return information about index templates|
|
||||
|`filterIndices` | String or String[] or Boolean | Limit returned metadata information to specific indices|
|
||||
|`filterMetadata` | Boolean | Do not return information about indices metadata|
|
||||
|`filterNodes` | Boolean | Do not return information about nodes|
|
||||
|`filterRoutingTable` | Boolean | Do not return information about shard allocation (`routing_table` and `routing_nodes`)|
|
||||
|`local` | Boolean | Return local information, do not retrieve the state from master node (default: false)|
|
||||
|`masterTimeout` | Date or Number | Specify timeout for connection to master|
|
||||
|
||||
|
||||
### count()
|
||||
|
||||
http://elasticsearch.org/guide/reference/api/count/
|
||||
|
||||
| Name | Type | Description |
|
||||
| ---- | ---- | ----------- |
|
||||
|`[ignoreIndices=none]` | String | When performed on multiple indices, allows to ignore `missing` ones|
|
||||
|`minScore` | Number | Include only documents with a specific `_score` value in the result|
|
||||
|`preference` | String | Specify the node or shard the operation should be performed on (default: random)|
|
||||
|`routing` | String | Specific routing value|
|
||||
|`source` | String | The URL-encoded query definition (instead of using the request body)|
|
||||
|`index` | String or String[] or Boolean | A comma-separated list of indices to restrict the results|
|
||||
|`type` | String or String[] or Boolean | A comma-separated list of types to restrict the results|
|
||||
|
||||
|
||||
### create()
|
||||
|
||||
http://elasticsearch.org/guide/reference/api/index_/
|
||||
|
||||
| Name | Type | Description |
|
||||
| ---- | ---- | ----------- |
|
||||
|`consistency` | String | Explicit write consistency setting for the operation|
|
||||
|`id` | String | Document ID|
|
||||
|`parent` | String | ID of the parent document|
|
||||
|`percolate` | String | Percolator queries to execute while indexing the document|
|
||||
|`refresh` | Boolean | Refresh the index after performing the operation|
|
||||
|`[replication=sync]` | String | Specific replication type|
|
||||
|`routing` | String | Specific routing value|
|
||||
|`timeout` | Date or Number | Explicit operation timeout|
|
||||
|`timestamp` | Date or Number | Explicit timestamp for the document|
|
||||
|`ttl` | Duration | Expiration time for the document|
|
||||
|`version` | Number | Explicit version number for concurrency control|
|
||||
|`versionType` | String | Specific version type|
|
||||
|`index` | String | The name of the index|
|
||||
|`type` | String | The type of the document|
|
||||
|
||||
|
||||
### delete()
|
||||
|
||||
http://elasticsearch.org/guide/reference/api/delete/
|
||||
|
||||
| Name | Type | Description |
|
||||
| ---- | ---- | ----------- |
|
||||
|`consistency` | String | Specific write consistency setting for the operation|
|
||||
|`parent` | String | ID of parent document|
|
||||
|`refresh` | Boolean | Refresh the index after performing the operation|
|
||||
|`[replication=sync]` | String | Specific replication type|
|
||||
|`routing` | String | Specific routing value|
|
||||
|`timeout` | Date or Number | Explicit operation timeout|
|
||||
|`version` | Number | Explicit version number for concurrency control|
|
||||
|`versionType` | String | Specific version type|
|
||||
|`id` | String | The document ID|
|
||||
|`index` | String | The name of the index|
|
||||
|`type` | String | The type of the document|
|
||||
|
||||
|
||||
### deleteByQuery()
|
||||
|
||||
http://www.elasticsearch.org/guide/reference/api/delete-by-query/
|
||||
|
||||
| Name | Type | Description |
|
||||
| ---- | ---- | ----------- |
|
||||
|`analyzer` | String | The analyzer to use for the query string|
|
||||
|`consistency` | String | Specific write consistency setting for the operation|
|
||||
|`[defaultOperator=OR]` | String | The default operator for query string query (AND or OR)|
|
||||
|`df` | String | The field to use as default where no field prefix is given in the query string|
|
||||
|`[ignoreIndices=none]` | String | When performed on multiple indices, allows to ignore `missing` ones|
|
||||
|`[replication=sync]` | String | Specific replication type|
|
||||
|`q` | String | Query in the Lucene query string syntax|
|
||||
|`routing` | String | Specific routing value|
|
||||
|`source` | String | The URL-encoded query definition (instead of using the request body)|
|
||||
|`timeout` | Date or Number | Explicit operation timeout|
|
||||
|`index` | String or String[] or Boolean | A comma-separated list of indices to restrict the operation; use `_all` to perform the operation on all indices|
|
||||
|`type` | String or String[] or Boolean | A comma-separated list of types to restrict the operation|
|
||||
|
||||
|
||||
### exists()
|
||||
|
||||
http://elasticsearch.org/guide/reference/api/get/
|
||||
|
||||
| Name | Type | Description |
|
||||
| ---- | ---- | ----------- |
|
||||
|`parent` | String | The ID of the parent document|
|
||||
|`preference` | String | Specify the node or shard the operation should be performed on (default: random)|
|
||||
|`realtime` | Boolean | Specify whether to perform the operation in realtime or search mode|
|
||||
|`refresh` | Boolean | Refresh the shard containing the document before performing the operation|
|
||||
|`routing` | String | Specific routing value|
|
||||
|`id` | String | The document ID|
|
||||
|`index` | String | The name of the index|
|
||||
|`[type=_all]` | String | The type of the document (use `_all` to fetch the first document matching the ID across all types)|
|
||||
|
||||
|
||||
### explain()
|
||||
|
||||
http://elasticsearch.org/guide/reference/api/explain/
|
||||
|
||||
| Name | Type | Description |
|
||||
| ---- | ---- | ----------- |
|
||||
|`analyzeWildcard` | Boolean | Specify whether wildcards and prefix queries in the query string query should be analyzed (default: false)|
|
||||
|`analyzer` | String | The analyzer for the query string query|
|
||||
|`[defaultOperator=OR]` | String | The default operator for query string query (AND or OR)|
|
||||
|`df` | String | The default field for query string query (default: _all)|
|
||||
|`fields` | String or String[] or Boolean | A comma-separated list of fields to return in the response|
|
||||
|`lenient` | Boolean | Specify whether format-based query failures (such as providing text to a numeric field) should be ignored|
|
||||
|`lowercaseExpandedTerms` | Boolean | Specify whether query terms should be lowercased|
|
||||
|`parent` | String | The ID of the parent document|
|
||||
|`preference` | String | Specify the node or shard the operation should be performed on (default: random)|
|
||||
|`q` | String | Query in the Lucene query string syntax|
|
||||
|`routing` | String | Specific routing value|
|
||||
|`source` | String or String[] or Boolean | True or false to return the _source field or not, or a list of fields to return|
|
||||
|`sourceExclude` | String or String[] or Boolean | A list of fields to exclude from the returned _source field|
|
||||
|`sourceInclude` | String or String[] or Boolean | A list of fields to extract and return from the _source field|
|
||||
|`id` | String | The document ID|
|
||||
|`index` | String | The name of the index|
|
||||
|`type` | String | The type of the document|
|
||||
|
||||
|
||||
### get()
|
||||
|
||||
http://elasticsearch.org/guide/reference/api/get/
|
||||
|
||||
| Name | Type | Description |
|
||||
| ---- | ---- | ----------- |
|
||||
|`fields` | String or String[] or Boolean | A comma-separated list of fields to return in the response|
|
||||
|`parent` | String | The ID of the parent document|
|
||||
|`preference` | String | Specify the node or shard the operation should be performed on (default: random)|
|
||||
|`realtime` | Boolean | Specify whether to perform the operation in realtime or search mode|
|
||||
|`refresh` | Boolean | Refresh the shard containing the document before performing the operation|
|
||||
|`routing` | String | Specific routing value|
|
||||
|`source` | String or String[] or Boolean | True or false to return the _source field or not, or a list of fields to return|
|
||||
|`sourceExclude` | String or String[] or Boolean | A list of fields to exclude from the returned _source field|
|
||||
|`sourceInclude` | String or String[] or Boolean | A list of fields to extract and return from the _source field|
|
||||
|`id` | String | The document ID|
|
||||
|`index` | String | The name of the index|
|
||||
|`[type=_all]` | String | The type of the document (use `_all` to fetch the first document matching the ID across all types)|
|
||||
|
||||
|
||||
### getSource()
|
||||
|
||||
http://elasticsearch.org/guide/reference/api/get/
|
||||
|
||||
| Name | Type | Description |
|
||||
| ---- | ---- | ----------- |
|
||||
|`exclude` | String or String[] or Boolean | A list of fields to exclude from the returned _source field|
|
||||
|`include` | String or String[] or Boolean | A list of fields to extract and return from the _source field|
|
||||
|`parent` | String | The ID of the parent document|
|
||||
|`preference` | String | Specify the node or shard the operation should be performed on (default: random)|
|
||||
|`realtime` | Boolean | Specify whether to perform the operation in realtime or search mode|
|
||||
|`refresh` | Boolean | Refresh the shard containing the document before performing the operation|
|
||||
|`routing` | String | Specific routing value|
|
||||
|`id` | String | The document ID|
|
||||
|`index` | String | The name of the index|
|
||||
|`[type=_all]` | String | The type of the document; use `_all` to fetch the first document matching the ID across all types|
|
||||
|
||||
|
||||
### index()
|
||||
|
||||
http://elasticsearch.org/guide/reference/api/index_/
|
||||
|
||||
| Name | Type | Description |
|
||||
| ---- | ---- | ----------- |
|
||||
|`consistency` | String | Explicit write consistency setting for the operation|
|
||||
|`[opType=index]` | String | Explicit operation type|
|
||||
|`parent` | String | ID of the parent document|
|
||||
|`percolate` | String | Percolator queries to execute while indexing the document|
|
||||
|`refresh` | Boolean | Refresh the index after performing the operation|
|
||||
|`[replication=sync]` | String | Specific replication type|
|
||||
|`routing` | String | Specific routing value|
|
||||
|`timeout` | Date or Number | Explicit operation timeout|
|
||||
|`timestamp` | Date or Number | Explicit timestamp for the document|
|
||||
|`ttl` | Duration | Expiration time for the document|
|
||||
|`version` | Number | Explicit version number for concurrency control|
|
||||
|`versionType` | String | Specific version type|
|
||||
|`id` | String | Document ID|
|
||||
|`index` | String | The name of the index|
|
||||
|`type` | String | The type of the document|
|
||||
|
||||
|
||||
### indices.analyze()
|
||||
|
||||
http://www.elasticsearch.org/guide/reference/api/admin-indices-analyze/
|
||||
|
||||
| Name | Type | Description |
|
||||
| ---- | ---- | ----------- |
|
||||
|`analyzer` | String | The name of the analyzer to use|
|
||||
|`field` | String | Use the analyzer configured for this field (instead of passing the analyzer name)|
|
||||
|`filters` | String or String[] or Boolean | A comma-separated list of filters to use for the analysis|
|
||||
|`index` | String | The name of the index to scope the operation|
|
||||
|`preferLocal` | Boolean | With `true`, specify that a local shard should be used if available, with `false`, use a random shard (default: true)|
|
||||
|`text` | String | The text on which the analysis should be performed (when request body is not used)|
|
||||
|`tokenizer` | String | The name of the tokenizer to use for the analysis|
|
||||
|`[format=detailed]` | String | Format of the output|
|
||||
|
||||
|
||||
### indices.clearCache()
|
||||
|
||||
http://www.elasticsearch.org/guide/reference/api/admin-indices-clearcache/
|
||||
|
||||
| Name | Type | Description |
|
||||
| ---- | ---- | ----------- |
|
||||
|`fieldData` | Boolean | Clear field data|
|
||||
|`fielddata` | Boolean | Clear field data|
|
||||
|`fields` | String or String[] or Boolean | A comma-separated list of fields to clear when using the `field_data` parameter (default: all)|
|
||||
|`filter` | Boolean | Clear filter caches|
|
||||
|`filterCache` | Boolean | Clear filter caches|
|
||||
|`filterKeys` | Boolean | A comma-separated list of keys to clear when using the `filter_cache` parameter (default: all)|
|
||||
|`id` | Boolean | Clear ID caches for parent/child|
|
||||
|`idCache` | Boolean | Clear ID caches for parent/child|
|
||||
|`[ignoreIndices=none]` | String | When performed on multiple indices, allows to ignore `missing` ones|
|
||||
|`index` | String or String[] or Boolean | A comma-separated list of index name to limit the operation|
|
||||
|`recycler` | Boolean | Clear the recycler cache|
|
||||
|
||||
|
||||
### indices.close()
|
||||
|
||||
http://www.elasticsearch.org/guide/reference/api/admin-indices-open-close/
|
||||
|
||||
| Name | Type | Description |
|
||||
| ---- | ---- | ----------- |
|
||||
|`timeout` | Date or Number | Explicit operation timeout|
|
||||
|`masterTimeout` | Date or Number | Specify timeout for connection to master|
|
||||
|`index` | String | The name of the index|
|
||||
|
||||
|
||||
### indices.create()
|
||||
|
||||
http://www.elasticsearch.org/guide/reference/api/admin-indices-create-index/
|
||||
|
||||
| Name | Type | Description |
|
||||
| ---- | ---- | ----------- |
|
||||
|`timeout` | Date or Number | Explicit operation timeout|
|
||||
|`masterTimeout` | Date or Number | Specify timeout for connection to master|
|
||||
|`index` | String | The name of the index|
|
||||
|
||||
|
||||
### indices.delete()
|
||||
|
||||
http://www.elasticsearch.org/guide/reference/api/admin-indices-delete-index/
|
||||
|
||||
| Name | Type | Description |
|
||||
| ---- | ---- | ----------- |
|
||||
|`timeout` | Date or Number | Explicit operation timeout|
|
||||
|`masterTimeout` | Date or Number | Specify timeout for connection to master|
|
||||
|`index` | String or String[] or Boolean | A comma-separated list of indices to delete; use `_all` or empty string to delete all indices|
|
||||
|
||||
|
||||
### indices.deleteAlias()
|
||||
|
||||
http://www.elasticsearch.org/guide/reference/api/admin-indices-aliases/
|
||||
|
||||
| Name | Type | Description |
|
||||
| ---- | ---- | ----------- |
|
||||
|`timeout` | Date or Number | Explicit timestamp for the document|
|
||||
|`masterTimeout` | Date or Number | Specify timeout for connection to master|
|
||||
|`index` | String | The name of the index with an alias|
|
||||
|`name` | String | The name of the alias to be deleted|
|
||||
|
||||
|
||||
### indices.deleteMapping()
|
||||
|
||||
http://www.elasticsearch.org/guide/reference/api/admin-indices-delete-mapping/
|
||||
|
||||
| Name | Type | Description |
|
||||
| ---- | ---- | ----------- |
|
||||
|`masterTimeout` | Date or Number | Specify timeout for connection to master|
|
||||
|`index` | String or String[] or Boolean | A comma-separated list of index names; use `_all` for all indices|
|
||||
|`type` | String | The name of the document type to delete|
|
||||
|
||||
|
||||
### indices.deleteTemplate()
|
||||
|
||||
http://www.elasticsearch.org/guide/reference/api/admin-indices-templates/
|
||||
|
||||
| Name | Type | Description |
|
||||
| ---- | ---- | ----------- |
|
||||
|`timeout` | Date or Number | Explicit operation timeout|
|
||||
|`masterTimeout` | Date or Number | Specify timeout for connection to master|
|
||||
|`name` | String | The name of the template|
|
||||
|
||||
|
||||
### indices.deleteWarmer()
|
||||
|
||||
http://www.elasticsearch.org/guide/reference/api/admin-indices-warmers/
|
||||
|
||||
| Name | Type | Description |
|
||||
| ---- | ---- | ----------- |
|
||||
|`masterTimeout` | Date or Number | Specify timeout for connection to master|
|
||||
|`index` | String or String[] or Boolean | A comma-separated list of index names to register warmer for; use `_all` or empty string to perform the operation on all indices|
|
||||
|`name` | String | The name of the warmer (supports wildcards); leave empty to delete all warmers|
|
||||
|`type` | String or String[] or Boolean | A comma-separated list of document types to register warmer for; use `_all` or empty string to perform the operation on all types|
|
||||
|
||||
|
||||
### indices.exists()
|
||||
|
||||
http://www.elasticsearch.org/guide/reference/api/admin-indices-indices-exists/
|
||||
|
||||
| Name | Type | Description |
|
||||
| ---- | ---- | ----------- |
|
||||
|`index` | String or String[] or Boolean | A comma-separated list of indices to check|
|
||||
|
||||
|
||||
### indices.existsAlias()
|
||||
|
||||
http://www.elasticsearch.org/guide/reference/api/admin-indices-aliases/
|
||||
|
||||
| Name | Type | Description |
|
||||
| ---- | ---- | ----------- |
|
||||
|`[ignoreIndices=none]` | String | When performed on multiple indices, allows to ignore `missing` ones|
|
||||
|`index` | String or String[] or Boolean | A comma-separated list of index names to filter aliases|
|
||||
|`name` | String or String[] or Boolean | A comma-separated list of alias names to return|
|
||||
|
||||
|
||||
### indices.existsType()
|
||||
|
||||
http://www.elasticsearch.org/guide/reference/api/admin-indices-types-exists/
|
||||
|
||||
| Name | Type | Description |
|
||||
| ---- | ---- | ----------- |
|
||||
|`[ignoreIndices=none]` | String | When performed on multiple indices, allows to ignore `missing` ones|
|
||||
|`index` | String or String[] or Boolean | A comma-separated list of index names; use `_all` to check the types across all indices|
|
||||
|`type` | String or String[] or Boolean | A comma-separated list of document types to check|
|
||||
|
||||
|
||||
### indices.flush()
|
||||
|
||||
http://www.elasticsearch.org/guide/reference/api/admin-indices-flush/
|
||||
|
||||
| Name | Type | Description |
|
||||
| ---- | ---- | ----------- |
|
||||
|`force` | Boolean | TODO: ?|
|
||||
|`full` | Boolean | TODO: ?|
|
||||
|`[ignoreIndices=none]` | String | When performed on multiple indices, allows to ignore `missing` ones|
|
||||
|`refresh` | Boolean | Refresh the index after performing the operation|
|
||||
|`index` | String or String[] or Boolean | A comma-separated list of index names; use `_all` or empty string for all indices|
|
||||
|
||||
|
||||
### indices.getAlias()
|
||||
|
||||
http://www.elasticsearch.org/guide/reference/api/admin-indices-aliases/
|
||||
|
||||
| Name | Type | Description |
|
||||
| ---- | ---- | ----------- |
|
||||
|`[ignoreIndices=none]` | String | When performed on multiple indices, allows to ignore `missing` ones|
|
||||
|`index` | String or String[] or Boolean | A comma-separated list of index names to filter aliases|
|
||||
|`name` | String or String[] or Boolean | A comma-separated list of alias names to return|
|
||||
|
||||
|
||||
### indices.getAliases()
|
||||
|
||||
http://www.elasticsearch.org/guide/reference/api/admin-indices-aliases/
|
||||
|
||||
| Name | Type | Description |
|
||||
| ---- | ---- | ----------- |
|
||||
|`timeout` | Date or Number | Explicit operation timeout|
|
||||
|`index` | String or String[] or Boolean | A comma-separated list of index names to filter aliases|
|
||||
|
||||
|
||||
### indices.getFieldMapping()
|
||||
|
||||
http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/indices-get-field-mapping.html
|
||||
|
||||
| Name | Type | Description |
|
||||
| ---- | ---- | ----------- |
|
||||
|`includeDefaults` | Boolean | Whether the default mapping values should be returned as well|
|
||||
|`index` | String or String[] or Boolean | A comma-separated list of index names|
|
||||
|`type` | String or String[] or Boolean | A comma-separated list of document types|
|
||||
|`field` | String or String[] or Boolean | A comma-separated list of fields|
|
||||
|
||||
|
||||
### indices.getMapping()
|
||||
|
||||
http://www.elasticsearch.org/guide/reference/api/admin-indices-get-mapping/
|
||||
|
||||
| Name | Type | Description |
|
||||
| ---- | ---- | ----------- |
|
||||
|`index` | String or String[] or Boolean | A comma-separated list of index names|
|
||||
|`type` | String or String[] or Boolean | A comma-separated list of document types|
|
||||
|
||||
|
||||
### indices.getSettings()
|
||||
|
||||
http://www.elasticsearch.org/guide/reference/api/admin-indices-get-settings/
|
||||
|
||||
| Name | Type | Description |
|
||||
| ---- | ---- | ----------- |
|
||||
|`index` | String or String[] or Boolean | A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices|
|
||||
|
||||
|
||||
### indices.getTemplate()
|
||||
|
||||
http://www.elasticsearch.org/guide/reference/api/admin-indices-templates/
|
||||
|
||||
| Name | Type | Description |
|
||||
| ---- | ---- | ----------- |
|
||||
|`name` | String | The name of the template|
|
||||
|
||||
|
||||
### indices.getWarmer()
|
||||
|
||||
http://www.elasticsearch.org/guide/reference/api/admin-indices-warmers/
|
||||
|
||||
| Name | Type | Description |
|
||||
| ---- | ---- | ----------- |
|
||||
|`index` | String or String[] or Boolean | A comma-separated list of index names to restrict the operation; use `_all` to perform the operation on all indices|
|
||||
|`name` | String | The name of the warmer (supports wildcards); leave empty to get all warmers|
|
||||
|`type` | String or String[] or Boolean | A comma-separated list of document types to restrict the operation; leave empty to perform the operation on all types|
|
||||
|
||||
|
||||
### indices.open()
|
||||
|
||||
http://www.elasticsearch.org/guide/reference/api/admin-indices-open-close/
|
||||
|
||||
| Name | Type | Description |
|
||||
| ---- | ---- | ----------- |
|
||||
|`timeout` | Date or Number | Explicit operation timeout|
|
||||
|`masterTimeout` | Date or Number | Specify timeout for connection to master|
|
||||
|`index` | String | The name of the index|
|
||||
|
||||
|
||||
### indices.optimize()
|
||||
|
||||
http://www.elasticsearch.org/guide/reference/api/admin-indices-optimize/
|
||||
|
||||
| Name | Type | Description |
|
||||
| ---- | ---- | ----------- |
|
||||
|`flush` | Boolean | Specify whether the index should be flushed after performing the operation (default: true)|
|
||||
|`[ignoreIndices=none]` | String | When performed on multiple indices, allows to ignore `missing` ones|
|
||||
|`maxNumSegments` | Number | The number of segments the index should be merged into (default: dynamic)|
|
||||
|`onlyExpungeDeletes` | Boolean | Specify whether the operation should only expunge deleted documents|
|
||||
|`operationThreading` | * | TODO: ?|
|
||||
|`refresh` | Boolean | Specify whether the index should be refreshed after performing the operation (default: true)|
|
||||
|`waitForMerge` | Boolean | Specify whether the request should block until the merge process is finished (default: true)|
|
||||
|`index` | String or String[] or Boolean | A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices|
|
||||
|
||||
|
||||
### indices.putAlias()
|
||||
|
||||
http://www.elasticsearch.org/guide/reference/api/admin-indices-aliases/
|
||||
|
||||
| Name | Type | Description |
|
||||
| ---- | ---- | ----------- |
|
||||
|`timeout` | Date or Number | Explicit timestamp for the document|
|
||||
|`masterTimeout` | Date or Number | Specify timeout for connection to master|
|
||||
|`index` | String | The name of the index with an alias|
|
||||
|`name` | String | The name of the alias to be created or updated|
|
||||
|
||||
|
||||
### indices.putMapping()
|
||||
|
||||
http://www.elasticsearch.org/guide/reference/api/admin-indices-put-mapping/
|
||||
|
||||
| Name | Type | Description |
|
||||
| ---- | ---- | ----------- |
|
||||
|`ignoreConflicts` | Boolean | Specify whether to ignore conflicts while updating the mapping (default: false)|
|
||||
|`timeout` | Date or Number | Explicit operation timeout|
|
||||
|`masterTimeout` | Date or Number | Specify timeout for connection to master|
|
||||
|`index` | String or String[] or Boolean | A comma-separated list of index names; use `_all` to perform the operation on all indices|
|
||||
|`type` | String | The name of the document type|
|
||||
|
||||
|
||||
### indices.putSettings()
|
||||
|
||||
http://www.elasticsearch.org/guide/reference/api/admin-indices-update-settings/
|
||||
|
||||
| Name | Type | Description |
|
||||
| ---- | ---- | ----------- |
|
||||
|`masterTimeout` | Date or Number | Specify timeout for connection to master|
|
||||
|`index` | String or String[] or Boolean | A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices|
|
||||
|
||||
|
||||
### indices.putTemplate()
|
||||
|
||||
http://www.elasticsearch.org/guide/reference/api/admin-indices-templates/
|
||||
|
||||
| Name | Type | Description |
|
||||
| ---- | ---- | ----------- |
|
||||
|`order` | Number | The order for this template when merging multiple matching ones (higher numbers are merged later, overriding the lower numbers)|
|
||||
|`timeout` | Date or Number | Explicit operation timeout|
|
||||
|`masterTimeout` | Date or Number | Specify timeout for connection to master|
|
||||
|`name` | String | The name of the template|
|
||||
|
||||
|
||||
### indices.putWarmer()
|
||||
|
||||
http://www.elasticsearch.org/guide/reference/api/admin-indices-warmers/
|
||||
|
||||
| Name | Type | Description |
|
||||
| ---- | ---- | ----------- |
|
||||
|`masterTimeout` | Date or Number | Specify timeout for connection to master|
|
||||
|`index` | String or String[] or Boolean | A comma-separated list of index names to register the warmer for; use `_all` or empty string to perform the operation on all indices|
|
||||
|`name` | String | The name of the warmer|
|
||||
|`type` | String or String[] or Boolean | A comma-separated list of document types to register the warmer for; leave empty to perform the operation on all types|
|
||||
|
||||
|
||||
### indices.refresh()
|
||||
|
||||
http://www.elasticsearch.org/guide/reference/api/admin-indices-refresh/
|
||||
|
||||
| Name | Type | Description |
|
||||
| ---- | ---- | ----------- |
|
||||
|`[ignoreIndices=none]` | String | When performed on multiple indices, allows to ignore `missing` ones|
|
||||
|`operationThreading` | * | TODO: ?|
|
||||
|`index` | String or String[] or Boolean | A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices|
|
||||
|
||||
|
||||
### indices.segments()
|
||||
|
||||
http://elasticsearch.org/guide/reference/api/admin-indices-segments/
|
||||
|
||||
| Name | Type | Description |
|
||||
| ---- | ---- | ----------- |
|
||||
|`[ignoreIndices=none]` | String | When performed on multiple indices, allows to ignore `missing` ones|
|
||||
|`operationThreading` | * | TODO: ?|
|
||||
|`index` | String or String[] or Boolean | A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices|
|
||||
|
||||
|
||||
### indices.snapshotIndex()
|
||||
|
||||
http://www.elasticsearch.org/guide/reference/api/admin-indices-gateway-snapshot/
|
||||
|
||||
| Name | Type | Description |
|
||||
| ---- | ---- | ----------- |
|
||||
|`[ignoreIndices=none]` | String | When performed on multiple indices, allows to ignore `missing` ones|
|
||||
|`index` | String or String[] or Boolean | A comma-separated list of index names; use `_all` or empty string for all indices|
|
||||
|
||||
|
||||
### indices.stats()
|
||||
|
||||
http://elasticsearch.org/guide/reference/api/admin-indices-stats/
|
||||
|
||||
| Name | Type | Description |
|
||||
| ---- | ---- | ----------- |
|
||||
|`all` | Boolean | Return all available information|
|
||||
|`clear` | Boolean | Reset the default level of detail|
|
||||
|`completion` | Boolean | Return information about completion suggester stats|
|
||||
|`completionFields` | String or String[] or Boolean | A comma-separated list of fields for `completion` metric (supports wildcards)|
|
||||
|`docs` | Boolean | Return information about indexed and deleted documents|
|
||||
|`fielddata` | Boolean | Return information about field data|
|
||||
|`fielddataFields` | String or String[] or Boolean | A comma-separated list of fields for `fielddata` metric (supports wildcards)|
|
||||
|`fields` | String or String[] or Boolean | A comma-separated list of fields to return detailed information for, when returning the `search` statistics|
|
||||
|`filterCache` | Boolean | Return information about filter cache|
|
||||
|`flush` | Boolean | Return information about flush operations|
|
||||
|`get` | Boolean | Return information about get operations|
|
||||
|`groups` | Boolean | A comma-separated list of search groups for `search` statistics|
|
||||
|`idCache` | Boolean | Return information about ID cache|
|
||||
|`[ignoreIndices=none]` | String | When performed on multiple indices, allows to ignore `missing` ones|
|
||||
|`indexing` | Boolean | Return information about indexing operations|
|
||||
|`merge` | Boolean | Return information about merge operations|
|
||||
|`refresh` | Boolean | Return information about refresh operations|
|
||||
|`search` | Boolean | Return information about search operations; use the `groups` parameter to include information for specific search groups|
|
||||
|`store` | Boolean | Return information about the size of the index|
|
||||
|`warmer` | Boolean | Return information about warmers|
|
||||
|`index` | String or String[] or Boolean | A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices|
|
||||
|`indexingTypes` | String or String[] or Boolean | A comma-separated list of document types to include in the `indexing` statistics|
|
||||
|`metricFamily` | String | Limit the information returned to a specific metric|
|
||||
|`searchGroups` | String or String[] or Boolean | A comma-separated list of search groups to include in the `search` statistics|
|
||||
|
||||
|
||||
### indices.status()
|
||||
|
||||
http://elasticsearch.org/guide/reference/api/admin-indices-status/
|
||||
|
||||
| Name | Type | Description |
|
||||
| ---- | ---- | ----------- |
|
||||
|`[ignoreIndices=none]` | String | When performed on multiple indices, allows to ignore `missing` ones|
|
||||
|`operationThreading` | * | TODO: ?|
|
||||
|`recovery` | Boolean | Return information about shard recovery|
|
||||
|`snapshot` | Boolean | TODO: ?|
|
||||
|`index` | String or String[] or Boolean | A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices|
|
||||
|
||||
|
||||
### indices.updateAliases()
|
||||
|
||||
http://www.elasticsearch.org/guide/reference/api/admin-indices-aliases/
|
||||
|
||||
| Name | Type | Description |
|
||||
| ---- | ---- | ----------- |
|
||||
|`timeout` | Date or Number | Request timeout|
|
||||
|`masterTimeout` | Date or Number | Specify timeout for connection to master|
|
||||
|`index` | String or String[] or Boolean | A comma-separated list of index names to filter aliases|
|
||||
|
||||
|
||||
### indices.validateQuery()
|
||||
|
||||
http://www.elasticsearch.org/guide/reference/api/validate/
|
||||
|
||||
| Name | Type | Description |
|
||||
| ---- | ---- | ----------- |
|
||||
|`explain` | Boolean | Return detailed information about the error|
|
||||
|`[ignoreIndices=none]` | String | When performed on multiple indices, allows to ignore `missing` ones|
|
||||
|`operationThreading` | * | TODO: ?|
|
||||
|`source` | String | The URL-encoded query definition (instead of using the request body)|
|
||||
|`q` | String | Query in the Lucene query string syntax|
|
||||
|`index` | String or String[] or Boolean | A comma-separated list of index names to restrict the operation; use `_all` or empty string to perform the operation on all indices|
|
||||
|`type` | String or String[] or Boolean | A comma-separated list of document types to restrict the operation; leave empty to perform the operation on all types|
|
||||
|
||||
|
||||
### info()
|
||||
|
||||
http://elasticsearch.org/guide/
|
||||
|
||||
| Name | Type | Description |
|
||||
| ---- | ---- | ----------- |
|
||||
|
||||
|
||||
### mget()
|
||||
|
||||
http://elasticsearch.org/guide/reference/api/multi-get/
|
||||
|
||||
| Name | Type | Description |
|
||||
| ---- | ---- | ----------- |
|
||||
|`fields` | String or String[] or Boolean | A comma-separated list of fields to return in the response|
|
||||
|`preference` | String | Specify the node or shard the operation should be performed on (default: random)|
|
||||
|`realtime` | Boolean | Specify whether to perform the operation in realtime or search mode|
|
||||
|`refresh` | Boolean | Refresh the shard containing the document before performing the operation|
|
||||
|`source` | String or String[] or Boolean | True or false to return the _source field or not, or a list of fields to return|
|
||||
|`sourceExclude` | String or String[] or Boolean | A list of fields to exclude from the returned _source field|
|
||||
|`sourceInclude` | String or String[] or Boolean | A list of fields to extract and return from the _source field|
|
||||
|`index` | String | The name of the index|
|
||||
|`type` | String | The type of the document|
|
||||
|
||||
|
||||
### mlt()
|
||||
|
||||
http://elasticsearch.org/guide/reference/api/more-like-this/
|
||||
|
||||
| Name | Type | Description |
|
||||
| ---- | ---- | ----------- |
|
||||
|`boostTerms` | Number | The boost factor|
|
||||
|`maxDocFreq` | Number | The word occurrence frequency as count: words with higher occurrence in the corpus will be ignored|
|
||||
|`maxQueryTerms` | Number | The maximum query terms to be included in the generated query|
|
||||
|`maxWordLen` | Number | The minimum length of the word: longer words will be ignored|
|
||||
|`minDocFreq` | Number | The word occurrence frequency as count: words with lower occurrence in the corpus will be ignored|
|
||||
|`minTermFreq` | Number | The term frequency as percent: terms with lower occurence in the source document will be ignored|
|
||||
|`minWordLen` | Number | The minimum length of the word: shorter words will be ignored|
|
||||
|`mltFields` | String or String[] or Boolean | Specific fields to perform the query against|
|
||||
|`percentTermsToMatch` | Number | How many terms have to match in order to consider the document a match (default: 0.3)|
|
||||
|`routing` | String | Specific routing value|
|
||||
|`searchFrom` | Number | The offset from which to return results|
|
||||
|`searchIndices` | String or String[] or Boolean | A comma-separated list of indices to perform the query against (default: the index containing the document)|
|
||||
|`searchQueryHint` | String | The search query hint|
|
||||
|`searchScroll` | String | A scroll search request definition|
|
||||
|`searchSize` | Number | The number of documents to return (default: 10)|
|
||||
|`searchSource` | String | A specific search request definition (instead of using the request body)|
|
||||
|`searchType` | String | Specific search type (eg. `dfs_then_fetch`, `count`, etc)|
|
||||
|`searchTypes` | String or String[] or Boolean | A comma-separated list of types to perform the query against (default: the same type as the document)|
|
||||
|`stopWords` | String or String[] or Boolean | A list of stop words to be ignored|
|
||||
|`id` | String | The document ID|
|
||||
|`index` | String | The name of the index|
|
||||
|`type` | String | The type of the document (use `_all` to fetch the first document matching the ID across all types)|
|
||||
|
||||
|
||||
### msearch()
|
||||
|
||||
http://www.elasticsearch.org/guide/reference/api/multi-search/
|
||||
|
||||
| Name | Type | Description |
|
||||
| ---- | ---- | ----------- |
|
||||
|`searchType` | String | Search operation type|
|
||||
|`index` | String or String[] or Boolean | A comma-separated list of index names to use as default|
|
||||
|`type` | String or String[] or Boolean | A comma-separated list of document types to use as default|
|
||||
|
||||
|
||||
### percolate()
|
||||
|
||||
http://elasticsearch.org/guide/reference/api/percolate/
|
||||
|
||||
| Name | Type | Description |
|
||||
| ---- | ---- | ----------- |
|
||||
|`preferLocal` | Boolean | With `true`, specify that a local shard should be used if available, with `false`, use a random shard (default: true)|
|
||||
|`index` | String | The name of the index with a registered percolator query|
|
||||
|`type` | String | The document type|
|
||||
|
||||
|
||||
### scroll()
|
||||
|
||||
http://www.elasticsearch.org/guide/reference/api/search/scroll/
|
||||
|
||||
| Name | Type | Description |
|
||||
| ---- | ---- | ----------- |
|
||||
|`scroll` | Duration | Specify how long a consistent view of the index should be maintained for scrolled search|
|
||||
|`scrollId` | String | The scroll ID|
|
||||
|
||||
|
||||
### search()
|
||||
|
||||
http://www.elasticsearch.org/guide/reference/api/search/
|
||||
|
||||
| Name | Type | Description |
|
||||
| ---- | ---- | ----------- |
|
||||
|`analyzer` | String | The analyzer to use for the query string|
|
||||
|`analyzeWildcard` | Boolean | Specify whether wildcard and prefix queries should be analyzed (default: false)|
|
||||
|`[defaultOperator=OR]` | String | The default operator for query string query (AND or OR)|
|
||||
|`df` | String | The field to use as default where no field prefix is given in the query string|
|
||||
|`explain` | Boolean | Specify whether to return detailed information about score computation as part of a hit|
|
||||
|`fields` | String or String[] or Boolean | A comma-separated list of fields to return as part of a hit|
|
||||
|`from` | Number | Starting offset (default: 0)|
|
||||
|`[ignoreIndices=none]` | String | When performed on multiple indices, allows to ignore `missing` ones|
|
||||
|`indicesBoost` | String or String[] or Boolean | Comma-separated list of index boosts|
|
||||
|`lenient` | Boolean | Specify whether format-based query failures (such as providing text to a numeric field) should be ignored|
|
||||
|`lowercaseExpandedTerms` | Boolean | Specify whether query terms should be lowercased|
|
||||
|`preference` | String | Specify the node or shard the operation should be performed on (default: random)|
|
||||
|`q` | String | Query in the Lucene query string syntax|
|
||||
|`routing` | String or String[] or Boolean | A comma-separated list of specific routing values|
|
||||
|`scroll` | Duration | Specify how long a consistent view of the index should be maintained for scrolled search|
|
||||
|`searchType` | String | Search operation type|
|
||||
|`size` | Number | Number of hits to return (default: 10)|
|
||||
|`sort` | String or String[] or Boolean | A comma-separated list of <field>:<direction> pairs|
|
||||
|`source` | String or String[] or Boolean | True or false to return the _source field or not, or a list of fields to return|
|
||||
|`sourceExclude` | String or String[] or Boolean | A list of fields to exclude from the returned _source field|
|
||||
|`sourceInclude` | String or String[] or Boolean | A list of fields to extract and return from the _source field|
|
||||
|`stats` | String or String[] or Boolean | Specific 'tag' of the request for logging and statistical purposes|
|
||||
|`suggestField` | String | Specify which field to use for suggestions|
|
||||
|`[suggestMode=missing]` | String | Specify suggest mode|
|
||||
|`suggestSize` | Number | How many suggestions to return in response|
|
||||
|`suggestText` | Text | The source text for which the suggestions should be returned|
|
||||
|`timeout` | Date or Number | Explicit operation timeout|
|
||||
|`version` | Boolean | Specify whether to return document version as part of a hit|
|
||||
|`[index=_all]` | String or String[] or Boolean | A comma-separated list of index names to search; use `_all` or empty string to perform the operation on all indices|
|
||||
|`type` | String or String[] or Boolean | A comma-separated list of document types to search; leave empty to perform the operation on all types|
|
||||
|
||||
|
||||
### suggest()
|
||||
|
||||
http://elasticsearch.org/guide/reference/api/search/suggest/
|
||||
|
||||
| Name | Type | Description |
|
||||
| ---- | ---- | ----------- |
|
||||
|`[ignoreIndices=none]` | String | When performed on multiple indices, allows to ignore `missing` ones|
|
||||
|`preference` | String | Specify the node or shard the operation should be performed on (default: random)|
|
||||
|`routing` | String | Specific routing value|
|
||||
|`source` | String | The URL-encoded request definition (instead of using request body)|
|
||||
|`index` | String or String[] or Boolean | A comma-separated list of index names to restrict the operation; use `_all` or empty string to perform the operation on all indices|
|
||||
|
||||
|
||||
### update()
|
||||
|
||||
http://elasticsearch.org/guide/reference/api/update/
|
||||
|
||||
| Name | Type | Description |
|
||||
| ---- | ---- | ----------- |
|
||||
|`consistency` | String | Explicit write consistency setting for the operation|
|
||||
|`fields` | String or String[] or Boolean | A comma-separated list of fields to return in the response|
|
||||
|`lang` | String | The script language (default: mvel)|
|
||||
|`parent` | String | ID of the parent document|
|
||||
|`percolate` | String | Perform percolation during the operation; use specific registered query name, attribute, or wildcard|
|
||||
|`refresh` | Boolean | Refresh the index after performing the operation|
|
||||
|`[replication=sync]` | String | Specific replication type|
|
||||
|`retryOnConflict` | Number | Specify how many times should the operation be retried when a conflict occurs (default: 0)|
|
||||
|`routing` | String | Specific routing value|
|
||||
|`script` | * | The URL-encoded script definition (instead of using request body)|
|
||||
|`timeout` | Date or Number | Explicit operation timeout|
|
||||
|`timestamp` | Date or Number | Explicit timestamp for the document|
|
||||
|`ttl` | Duration | Expiration time for the document|
|
||||
|`version` | Number | Explicit version number for concurrency control|
|
||||
|`versionType` | String | Specific version type|
|
||||
|`id` | String | Document ID|
|
||||
|`index` | String | The name of the index|
|
||||
|`type` | String | The type of the document|
|
||||
|
||||
39
docs/errors.md
Normal file
39
docs/errors.md
Normal file
@ -0,0 +1,39 @@
|
||||
# Errors
|
||||
|
||||
These are the standard Error types which may be passed back from the client. To access the constructors access the errors module via `require('elasticsearch').errors`.
|
||||
|
||||
## ConnectionFault
|
||||
The connection was unable to initiate or complete a request with the Elasticsearch node.
|
||||
|
||||
## NoConnections
|
||||
All of the connections in the ConnectionPool are dead.
|
||||
|
||||
## RequestTimeout
|
||||
The request timed-out.
|
||||
|
||||
## Serialization
|
||||
The response received from Elasticsearch could not be deserilaized.
|
||||
|
||||
## 503 or ServiceUnavailable
|
||||
Elasticsearch responded with a 503 status.
|
||||
|
||||
## 500 or InternalServerError
|
||||
Elasticsearch responded with a 500 status.
|
||||
|
||||
## 412 or PreconditionFailed
|
||||
Elasticsearch responded with a 412 status.
|
||||
|
||||
## 409 or Conflict
|
||||
Elasticsearch responded with a 409 status.
|
||||
|
||||
## 403 or Forbidden
|
||||
Elasticsearch responded with a 403 status.
|
||||
|
||||
## 404 or NotFound
|
||||
Elasticsearch responded with a 404 status.
|
||||
|
||||
## 400 or BadRequest
|
||||
Elasticsearch responded with a 400 status.
|
||||
|
||||
## Generic
|
||||
Elasticsearch responded with a status that does not map to it's own error type.
|
||||
11
docs/replacing_core_components.md
Normal file
11
docs/replacing_core_components.md
Normal file
@ -0,0 +1,11 @@
|
||||
# Replacing Core Components
|
||||
|
||||
TODO: detail the components that are replaceable
|
||||
|
||||
## API
|
||||
|
||||
## Connection
|
||||
|
||||
## ConnectionPool
|
||||
|
||||
## Log
|
||||
3
docs/setting_up_logging.md
Normal file
3
docs/setting_up_logging.md
Normal file
@ -0,0 +1,3 @@
|
||||
# Setting Up Logging
|
||||
|
||||
TODO: what are loggers, how to use bunyan/winston
|
||||
44
package.json
44
package.json
@ -7,36 +7,34 @@
|
||||
"homepage": "https://github.com/elasticsearch/elasticsearch-js",
|
||||
"version": "0.0.1",
|
||||
"devDependencies": {
|
||||
"tar": "*",
|
||||
"mocha": "*",
|
||||
"async": "*",
|
||||
"mkdirp": "*",
|
||||
"moment": "*",
|
||||
"should": "*",
|
||||
"js-yaml": "*",
|
||||
"optimist": "*",
|
||||
"expect.js": "*",
|
||||
"minimatch": "*",
|
||||
"browserify": "*",
|
||||
"grunt": "*",
|
||||
"grunt-contrib-jshint": "*",
|
||||
"grunt-contrib-nodeunit": "*",
|
||||
"grunt-mocha-test": "*",
|
||||
"grunt-contrib-watch": "*",
|
||||
"grunt-browserify": "*",
|
||||
"grunt-contrib-clean": "*",
|
||||
"grunt-contrib-uglify": "*",
|
||||
"grunt-mocha": "*",
|
||||
"tar": "~0.1.18",
|
||||
"mocha": "~1.14.0",
|
||||
"async": "~0.2.9",
|
||||
"mkdirp": "~0.3.5",
|
||||
"moment": "~2.4.0",
|
||||
"should": "~2.1.0",
|
||||
"js-yaml": "~2.1.3",
|
||||
"optimist": "~0.6.0",
|
||||
"expect.js": "~0.2.0",
|
||||
"minimatch": "~0.2.12",
|
||||
"browserify": "~2.35.1",
|
||||
"grunt": "~0.4.1",
|
||||
"grunt-contrib-jshint": "~0.7.1",
|
||||
"grunt-mocha-test": "~0.7.0",
|
||||
"grunt-browserify": "~1.2.11",
|
||||
"grunt-contrib-clean": "~0.5.0",
|
||||
"grunt-contrib-uglify": "~0.2.7",
|
||||
"grunt-contrib-concat": "~0.3.0",
|
||||
"grunt-open": "~0.2.2",
|
||||
"grunt-run": "~0.1.0",
|
||||
"xmlbuilder": "~0.4.3"
|
||||
"xmlbuilder": "~0.4.3",
|
||||
"grunt-contrib-watch": "~0.5.3"
|
||||
},
|
||||
"license": "Apache License",
|
||||
"dependencies": {
|
||||
"when": "~2.6.0",
|
||||
"lodash": "*",
|
||||
"agentkeepalive": "*",
|
||||
"lodash": "~2.3.0",
|
||||
"agentkeepalive": "~0.1",
|
||||
"chalk": "~0.3.0"
|
||||
},
|
||||
"scripts": {
|
||||
|
||||
@ -8,6 +8,7 @@ var clean = require('../../clean');
|
||||
var urlParamRE = /\{(\w+)\}/g;
|
||||
|
||||
var outputPath = _.joinPath(__dirname, '../../../src/lib/api.js');
|
||||
var docOutputPath = _.joinPath(__dirname, '../../../docs/api.md');
|
||||
|
||||
function download() {
|
||||
require('./actions').on('ready', function (actions) {
|
||||
@ -27,6 +28,9 @@ function download() {
|
||||
actions: actions,
|
||||
namespaces: _.unique(namespaces.sort(), true)
|
||||
}));
|
||||
fs.writeFileSync(docOutputPath, templates.apiDocs({
|
||||
actions: actions
|
||||
}));
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
39
scripts/generate/js_api/templates/api_docs.tmpl
Normal file
39
scripts/generate/js_api/templates/api_docs.tmpl
Normal file
@ -0,0 +1,39 @@
|
||||
# API
|
||||
|
||||
## Table Of Contents
|
||||
|
||||
<%
|
||||
|
||||
function esc(str) {
|
||||
return str.replace(/\|/g, '|');
|
||||
}
|
||||
|
||||
var _paramWithDefault = paramWithDefault;
|
||||
paramWithDefault = function (name, _default) {
|
||||
return esc(_paramWithDefault(name, _default));
|
||||
};
|
||||
|
||||
var _paramType = paramType;
|
||||
paramType = function (type) {
|
||||
return esc(_paramType(type));
|
||||
};
|
||||
|
||||
_.each(actions, function (action) {%>
|
||||
- [<%= action.name %>](#<%= action.name.toLowerCase().replace(/[^\w]/g, '') %>)<%
|
||||
})
|
||||
|
||||
_.each(actions, function (action) {
|
||||
%>
|
||||
|
||||
### <%= action.name %>()
|
||||
|
||||
<%= action.docUrl %>
|
||||
|
||||
| Name | Type | Description |
|
||||
| ---- | ---- | ----------- |
|
||||
<%
|
||||
_.each(action.allParams, function(param, paramName) {
|
||||
%>|`<%= paramWithDefault(paramName, param.default) %>` | <%= paramType(param.type) %> | <%= esc(param.description || '') %>|
|
||||
<% })
|
||||
|
||||
}); %>
|
||||
@ -87,13 +87,13 @@ var templateGlobals = {
|
||||
paramType: function (type) {
|
||||
switch (type && type.toLowerCase ? type.toLowerCase() : 'any') {
|
||||
case 'time':
|
||||
return 'Date|Number';
|
||||
return 'Date or Number';
|
||||
case 'any':
|
||||
return '*';
|
||||
case 'enum':
|
||||
return 'String';
|
||||
case 'list':
|
||||
return 'String|ArrayOfStrings|Boolean';
|
||||
return 'String or String[] or Boolean';
|
||||
default:
|
||||
return _.ucfirst(type);
|
||||
}
|
||||
@ -125,5 +125,6 @@ fs.readdirSync(path.resolve(__dirname)).forEach(function (filename) {
|
||||
templates.text = templates.string;
|
||||
|
||||
module.exports = {
|
||||
apiFile: templates.api_file
|
||||
apiFile: templates.api_file,
|
||||
apiDocs: templates.api_docs
|
||||
};
|
||||
|
||||
@ -6,7 +6,8 @@ var zlib = require('zlib');
|
||||
var path = require('path');
|
||||
var _ = require('lodash');
|
||||
var url = require('url');
|
||||
var tarUrl = 'https://github.com/elasticsearch/elasticsearch-rest-api-spec/archive/master.tar.gz';
|
||||
var tarUrl = 'https://github.com/elasticsearch/elasticsearch-rest-api-spec/tarball/master';
|
||||
var topDir = null; // remove the lowest directory, which changes with each commit.
|
||||
|
||||
exports.get = function (pattern) {
|
||||
var stream = new EventEmitter();
|
||||
@ -27,9 +28,14 @@ exports.get = function (pattern) {
|
||||
console.error('request failed', incoming.statusCode, incoming.headers);
|
||||
}
|
||||
} else {
|
||||
incoming.pipe(zlib.createGunzip()).pipe(tar.Parse())
|
||||
incoming
|
||||
.pipe(zlib.createGunzip())
|
||||
.pipe(tar.Parse())
|
||||
.on('entry', function (entry) {
|
||||
entry.path = path.relative('elasticsearch-rest-api-spec-master', entry.path);
|
||||
if (!topDir) {
|
||||
topDir = entry.path.split('/').shift();
|
||||
}
|
||||
entry.path = path.relative(topDir, entry.path);
|
||||
if (matcher.match(entry.path)) {
|
||||
collectData(entry);
|
||||
} else {
|
||||
|
||||
250
src/lib/api.js
250
src/lib/api.js
@ -78,7 +78,7 @@ api.bulk = ca({
|
||||
* Perform a [clearScroll](http://www.elasticsearch.org/guide/reference/api/search/scroll/) request
|
||||
*
|
||||
* @param {Object} params - An object with parameters used to carry out this action
|
||||
* @param {String|ArrayOfStrings|Boolean} params.scrollId - A comma-separated list of scroll IDs to clear
|
||||
* @param {String or String[] or Boolean} params.scrollId - A comma-separated list of scroll IDs to clear
|
||||
*/
|
||||
api.clearScroll = ca({
|
||||
methods: [
|
||||
@ -130,8 +130,8 @@ api.cluster.prototype.getSettings = ca({
|
||||
* @param {Object} params - An object with parameters used to carry out this action
|
||||
* @param {String} [params.level=cluster] - Specify the level of detail for returned information
|
||||
* @param {Boolean} params.local - Return local information, do not retrieve the state from master node (default: false)
|
||||
* @param {Date|Number} params.masterTimeout - Explicit operation timeout for connection to master node
|
||||
* @param {Date|Number} params.timeout - Explicit operation timeout
|
||||
* @param {Date or Number} params.masterTimeout - Explicit operation timeout for connection to master node
|
||||
* @param {Date or Number} params.timeout - Explicit operation timeout
|
||||
* @param {Number} params.waitForActiveShards - Wait until the specified number of shards is active
|
||||
* @param {String} params.waitForNodes - Wait until the specified number of nodes is available
|
||||
* @param {Number} params.waitForRelocatingShards - Wait until the specified number of relocating shards is finished
|
||||
@ -205,11 +205,11 @@ api.cluster.prototype.health = ca({
|
||||
* Perform a [cluster.nodeHotThreads](http://www.elasticsearch.org/guide/reference/api/admin-cluster-nodes-hot-threads/) request
|
||||
*
|
||||
* @param {Object} params - An object with parameters used to carry out this action
|
||||
* @param {Date|Number} params.interval - The interval for the second sampling of threads
|
||||
* @param {Date or Number} params.interval - The interval for the second sampling of threads
|
||||
* @param {Number} params.snapshots - Number of samples of thread stacktrace (default: 10)
|
||||
* @param {Number} params.threads - Specify the number of threads to provide information for (default: 3)
|
||||
* @param {String} params.type - The type to sample (default: cpu)
|
||||
* @param {String|ArrayOfStrings|Boolean} params.nodeId - 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
|
||||
* @param {String or String[] or Boolean} params.nodeId - 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
|
||||
*/
|
||||
api.cluster.prototype.nodeHotThreads = ca({
|
||||
methods: [
|
||||
@ -264,9 +264,9 @@ api.cluster.prototype.nodeHotThreads = ca({
|
||||
* @param {Boolean} params.process - Return information about the Elasticsearch process
|
||||
* @param {Boolean} params.settings - Return information about node settings
|
||||
* @param {Boolean} params.threadPool - Return information about the thread pool
|
||||
* @param {Date|Number} params.timeout - Explicit operation timeout
|
||||
* @param {Date or Number} params.timeout - Explicit operation timeout
|
||||
* @param {Boolean} params.transport - Return information about transport
|
||||
* @param {String|ArrayOfStrings|Boolean} params.nodeId - 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
|
||||
* @param {String or String[] or Boolean} params.nodeId - 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
|
||||
*/
|
||||
api.cluster.prototype.nodeInfo = ca({
|
||||
methods: [
|
||||
@ -331,9 +331,9 @@ api.cluster.prototype.nodeInfo = ca({
|
||||
* Perform a [cluster.nodeShutdown](http://elasticsearch.org/guide/reference/api/admin-cluster-nodes-shutdown/) request
|
||||
*
|
||||
* @param {Object} params - An object with parameters used to carry out this action
|
||||
* @param {Date|Number} params.delay - Set the delay for the operation (default: 1s)
|
||||
* @param {Date or Number} params.delay - Set the delay for the operation (default: 1s)
|
||||
* @param {Boolean} params.exit - Exit the JVM as well (default: true)
|
||||
* @param {String|ArrayOfStrings|Boolean} params.nodeId - 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
|
||||
* @param {String or String[] or Boolean} params.nodeId - 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
|
||||
*/
|
||||
api.cluster.prototype.nodeShutdown = ca({
|
||||
methods: [
|
||||
@ -369,7 +369,7 @@ api.cluster.prototype.nodeShutdown = ca({
|
||||
* @param {Object} params - An object with parameters used to carry out this action
|
||||
* @param {Boolean} params.all - Return all available information
|
||||
* @param {Boolean} params.clear - Reset the default level of detail
|
||||
* @param {String|ArrayOfStrings|Boolean} params.fields - A comma-separated list of fields to return detailed information for, when returning the `indices` metric family (supports wildcards)
|
||||
* @param {String or String[] or Boolean} params.fields - A comma-separated list of fields to return detailed information for, when returning the `indices` metric family (supports wildcards)
|
||||
* @param {Boolean} params.fs - Return information about the filesystem
|
||||
* @param {Boolean} params.http - Return information about HTTP
|
||||
* @param {Boolean} params.indices - Return information about indices
|
||||
@ -381,7 +381,7 @@ api.cluster.prototype.nodeShutdown = ca({
|
||||
* @param {Boolean} params.transport - Return information about transport
|
||||
* @param {String} params.metricFamily - Limit the information returned to a certain metric family
|
||||
* @param {String} params.metric - Limit the information returned for `indices` family to a specific metric
|
||||
* @param {String|ArrayOfStrings|Boolean} params.nodeId - 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
|
||||
* @param {String or String[] or Boolean} params.nodeId - 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
|
||||
*/
|
||||
api.cluster.prototype.nodeStats = ca({
|
||||
methods: [
|
||||
@ -495,12 +495,12 @@ api.cluster.prototype.reroute = ca({
|
||||
* @param {Object} params - An object with parameters used to carry out this action
|
||||
* @param {Boolean} params.filterBlocks - Do not return information about blocks
|
||||
* @param {Boolean} params.filterIndexTemplates - Do not return information about index templates
|
||||
* @param {String|ArrayOfStrings|Boolean} params.filterIndices - Limit returned metadata information to specific indices
|
||||
* @param {String or String[] or Boolean} params.filterIndices - Limit returned metadata information to specific indices
|
||||
* @param {Boolean} params.filterMetadata - Do not return information about indices metadata
|
||||
* @param {Boolean} params.filterNodes - Do not return information about nodes
|
||||
* @param {Boolean} params.filterRoutingTable - Do not return information about shard allocation (`routing_table` and `routing_nodes`)
|
||||
* @param {Boolean} params.local - Return local information, do not retrieve the state from master node (default: false)
|
||||
* @param {Date|Number} params.masterTimeout - Specify timeout for connection to master
|
||||
* @param {Date or Number} params.masterTimeout - Specify timeout for connection to master
|
||||
*/
|
||||
api.cluster.prototype.state = ca({
|
||||
methods: [
|
||||
@ -556,8 +556,8 @@ api.cluster.prototype.state = ca({
|
||||
* @param {String} params.preference - Specify the node or shard the operation should be performed on (default: random)
|
||||
* @param {String} params.routing - Specific routing value
|
||||
* @param {String} params.source - The URL-encoded query definition (instead of using the request body)
|
||||
* @param {String|ArrayOfStrings|Boolean} params.index - A comma-separated list of indices to restrict the results
|
||||
* @param {String|ArrayOfStrings|Boolean} params.type - A comma-separated list of types to restrict the results
|
||||
* @param {String or String[] or Boolean} params.index - A comma-separated list of indices to restrict the results
|
||||
* @param {String or String[] or Boolean} params.type - A comma-separated list of types to restrict the results
|
||||
*/
|
||||
api.count = ca({
|
||||
methods: [
|
||||
@ -626,8 +626,8 @@ api.count = ca({
|
||||
* @param {Boolean} params.refresh - Refresh the index after performing the operation
|
||||
* @param {String} [params.replication=sync] - Specific replication type
|
||||
* @param {String} params.routing - Specific routing value
|
||||
* @param {Date|Number} params.timeout - Explicit operation timeout
|
||||
* @param {Date|Number} params.timestamp - Explicit timestamp for the document
|
||||
* @param {Date or Number} params.timeout - Explicit operation timeout
|
||||
* @param {Date or Number} params.timestamp - Explicit timestamp for the document
|
||||
* @param {Duration} params.ttl - Expiration time for the document
|
||||
* @param {Number} params.version - Explicit version number for concurrency control
|
||||
* @param {String} params.versionType - Specific version type
|
||||
@ -731,7 +731,7 @@ api.create = ca({
|
||||
* @param {Boolean} params.refresh - Refresh the index after performing the operation
|
||||
* @param {String} [params.replication=sync] - Specific replication type
|
||||
* @param {String} params.routing - Specific routing value
|
||||
* @param {Date|Number} params.timeout - Explicit operation timeout
|
||||
* @param {Date or Number} params.timeout - Explicit operation timeout
|
||||
* @param {Number} params.version - Explicit version number for concurrency control
|
||||
* @param {String} params.versionType - Specific version type
|
||||
* @param {String} params.id - The document ID
|
||||
@ -815,9 +815,9 @@ api['delete'] = ca({
|
||||
* @param {String} params.q - Query in the Lucene query string syntax
|
||||
* @param {String} params.routing - Specific routing value
|
||||
* @param {String} params.source - The URL-encoded query definition (instead of using the request body)
|
||||
* @param {Date|Number} params.timeout - Explicit operation timeout
|
||||
* @param {String|ArrayOfStrings|Boolean} params.index - A comma-separated list of indices to restrict the operation; use `_all` to perform the operation on all indices
|
||||
* @param {String|ArrayOfStrings|Boolean} params.type - A comma-separated list of types to restrict the operation
|
||||
* @param {Date or Number} params.timeout - Explicit operation timeout
|
||||
* @param {String or String[] or Boolean} params.index - A comma-separated list of indices to restrict the operation; use `_all` to perform the operation on all indices
|
||||
* @param {String or String[] or Boolean} params.type - A comma-separated list of types to restrict the operation
|
||||
*/
|
||||
api.deleteByQuery = ca({
|
||||
methods: [
|
||||
@ -966,16 +966,16 @@ api.exists = ca({
|
||||
* @param {String} params.analyzer - The analyzer for the query string query
|
||||
* @param {String} [params.defaultOperator=OR] - The default operator for query string query (AND or OR)
|
||||
* @param {String} params.df - The default field for query string query (default: _all)
|
||||
* @param {String|ArrayOfStrings|Boolean} params.fields - A comma-separated list of fields to return in the response
|
||||
* @param {String or String[] or Boolean} params.fields - A comma-separated list of fields to return in the response
|
||||
* @param {Boolean} params.lenient - Specify whether format-based query failures (such as providing text to a numeric field) should be ignored
|
||||
* @param {Boolean} params.lowercaseExpandedTerms - Specify whether query terms should be lowercased
|
||||
* @param {String} params.parent - The ID of the parent document
|
||||
* @param {String} params.preference - Specify the node or shard the operation should be performed on (default: random)
|
||||
* @param {String} params.q - Query in the Lucene query string syntax
|
||||
* @param {String} params.routing - Specific routing value
|
||||
* @param {String|ArrayOfStrings|Boolean} params.source - True or false to return the _source field or not, or a list of fields to return
|
||||
* @param {String|ArrayOfStrings|Boolean} params.sourceExclude - A list of fields to exclude from the returned _source field
|
||||
* @param {String|ArrayOfStrings|Boolean} params.sourceInclude - A list of fields to extract and return from the _source field
|
||||
* @param {String or String[] or Boolean} params.source - True or false to return the _source field or not, or a list of fields to return
|
||||
* @param {String or String[] or Boolean} params.sourceExclude - A list of fields to exclude from the returned _source field
|
||||
* @param {String or String[] or Boolean} params.sourceInclude - A list of fields to extract and return from the _source field
|
||||
* @param {String} params.id - The document ID
|
||||
* @param {String} params.index - The name of the index
|
||||
* @param {String} params.type - The type of the document
|
||||
@ -1063,15 +1063,15 @@ api.explain = ca({
|
||||
* Perform a [get](http://elasticsearch.org/guide/reference/api/get/) request
|
||||
*
|
||||
* @param {Object} params - An object with parameters used to carry out this action
|
||||
* @param {String|ArrayOfStrings|Boolean} params.fields - A comma-separated list of fields to return in the response
|
||||
* @param {String or String[] or Boolean} params.fields - A comma-separated list of fields to return in the response
|
||||
* @param {String} params.parent - The ID of the parent document
|
||||
* @param {String} params.preference - Specify the node or shard the operation should be performed on (default: random)
|
||||
* @param {Boolean} params.realtime - Specify whether to perform the operation in realtime or search mode
|
||||
* @param {Boolean} params.refresh - Refresh the shard containing the document before performing the operation
|
||||
* @param {String} params.routing - Specific routing value
|
||||
* @param {String|ArrayOfStrings|Boolean} params.source - True or false to return the _source field or not, or a list of fields to return
|
||||
* @param {String|ArrayOfStrings|Boolean} params.sourceExclude - A list of fields to exclude from the returned _source field
|
||||
* @param {String|ArrayOfStrings|Boolean} params.sourceInclude - A list of fields to extract and return from the _source field
|
||||
* @param {String or String[] or Boolean} params.source - True or false to return the _source field or not, or a list of fields to return
|
||||
* @param {String or String[] or Boolean} params.sourceExclude - A list of fields to exclude from the returned _source field
|
||||
* @param {String or String[] or Boolean} params.sourceInclude - A list of fields to extract and return from the _source field
|
||||
* @param {String} params.id - The document ID
|
||||
* @param {String} params.index - The name of the index
|
||||
* @param {String} [params.type=_all] - The type of the document (use `_all` to fetch the first document matching the ID across all types)
|
||||
@ -1138,8 +1138,8 @@ api.get = ca({
|
||||
* Perform a [getSource](http://elasticsearch.org/guide/reference/api/get/) request
|
||||
*
|
||||
* @param {Object} params - An object with parameters used to carry out this action
|
||||
* @param {String|ArrayOfStrings|Boolean} params.exclude - A list of fields to exclude from the returned _source field
|
||||
* @param {String|ArrayOfStrings|Boolean} params.include - A list of fields to extract and return from the _source field
|
||||
* @param {String or String[] or Boolean} params.exclude - A list of fields to exclude from the returned _source field
|
||||
* @param {String or String[] or Boolean} params.include - A list of fields to extract and return from the _source field
|
||||
* @param {String} params.parent - The ID of the parent document
|
||||
* @param {String} params.preference - Specify the node or shard the operation should be performed on (default: random)
|
||||
* @param {Boolean} params.realtime - Specify whether to perform the operation in realtime or search mode
|
||||
@ -1209,8 +1209,8 @@ api.getSource = ca({
|
||||
* @param {Boolean} params.refresh - Refresh the index after performing the operation
|
||||
* @param {String} [params.replication=sync] - Specific replication type
|
||||
* @param {String} params.routing - Specific routing value
|
||||
* @param {Date|Number} params.timeout - Explicit operation timeout
|
||||
* @param {Date|Number} params.timestamp - Explicit timestamp for the document
|
||||
* @param {Date or Number} params.timeout - Explicit operation timeout
|
||||
* @param {Date or Number} params.timestamp - Explicit timestamp for the document
|
||||
* @param {Duration} params.ttl - Expiration time for the document
|
||||
* @param {Number} params.version - Explicit version number for concurrency control
|
||||
* @param {String} params.versionType - Specific version type
|
||||
@ -1326,7 +1326,7 @@ api.indices = function IndicesNS(client) {
|
||||
* @param {Object} params - An object with parameters used to carry out this action
|
||||
* @param {String} params.analyzer - The name of the analyzer to use
|
||||
* @param {String} params.field - Use the analyzer configured for this field (instead of passing the analyzer name)
|
||||
* @param {String|ArrayOfStrings|Boolean} params.filters - A comma-separated list of filters to use for the analysis
|
||||
* @param {String or String[] or Boolean} params.filters - A comma-separated list of filters to use for the analysis
|
||||
* @param {String} params.index - The name of the index to scope the operation
|
||||
* @param {Boolean} params.preferLocal - With `true`, specify that a local shard should be used if available, with `false`, use a random shard (default: true)
|
||||
* @param {String} params.text - The text on which the analysis should be performed (when request body is not used)
|
||||
@ -1392,14 +1392,14 @@ api.indices.prototype.analyze = ca({
|
||||
* @param {Object} params - An object with parameters used to carry out this action
|
||||
* @param {Boolean} params.fieldData - Clear field data
|
||||
* @param {Boolean} params.fielddata - Clear field data
|
||||
* @param {String|ArrayOfStrings|Boolean} params.fields - A comma-separated list of fields to clear when using the `field_data` parameter (default: all)
|
||||
* @param {String or String[] or Boolean} params.fields - A comma-separated list of fields to clear when using the `field_data` parameter (default: all)
|
||||
* @param {Boolean} params.filter - Clear filter caches
|
||||
* @param {Boolean} params.filterCache - Clear filter caches
|
||||
* @param {Boolean} params.filterKeys - A comma-separated list of keys to clear when using the `filter_cache` parameter (default: all)
|
||||
* @param {Boolean} params.id - Clear ID caches for parent/child
|
||||
* @param {Boolean} params.idCache - Clear ID caches for parent/child
|
||||
* @param {String} [params.ignoreIndices=none] - When performed on multiple indices, allows to ignore `missing` ones
|
||||
* @param {String|ArrayOfStrings|Boolean} params.index - A comma-separated list of index name to limit the operation
|
||||
* @param {String or String[] or Boolean} params.index - A comma-separated list of index name to limit the operation
|
||||
* @param {Boolean} params.recycler - Clear the recycler cache
|
||||
*/
|
||||
api.indices.prototype.clearCache = ca({
|
||||
@ -1472,8 +1472,8 @@ api.indices.prototype.clearCache = ca({
|
||||
* Perform a [indices.close](http://www.elasticsearch.org/guide/reference/api/admin-indices-open-close/) request
|
||||
*
|
||||
* @param {Object} params - An object with parameters used to carry out this action
|
||||
* @param {Date|Number} params.timeout - Explicit operation timeout
|
||||
* @param {Date|Number} params.masterTimeout - Specify timeout for connection to master
|
||||
* @param {Date or Number} params.timeout - Explicit operation timeout
|
||||
* @param {Date or Number} params.masterTimeout - Specify timeout for connection to master
|
||||
* @param {String} params.index - The name of the index
|
||||
*/
|
||||
api.indices.prototype.close = ca({
|
||||
@ -1506,8 +1506,8 @@ api.indices.prototype.close = ca({
|
||||
* Perform a [indices.create](http://www.elasticsearch.org/guide/reference/api/admin-indices-create-index/) request
|
||||
*
|
||||
* @param {Object} params - An object with parameters used to carry out this action
|
||||
* @param {Date|Number} params.timeout - Explicit operation timeout
|
||||
* @param {Date|Number} params.masterTimeout - Specify timeout for connection to master
|
||||
* @param {Date or Number} params.timeout - Explicit operation timeout
|
||||
* @param {Date or Number} params.masterTimeout - Specify timeout for connection to master
|
||||
* @param {String} params.index - The name of the index
|
||||
*/
|
||||
api.indices.prototype.create = ca({
|
||||
@ -1541,9 +1541,9 @@ api.indices.prototype.create = ca({
|
||||
* Perform a [indices.delete](http://www.elasticsearch.org/guide/reference/api/admin-indices-delete-index/) request
|
||||
*
|
||||
* @param {Object} params - An object with parameters used to carry out this action
|
||||
* @param {Date|Number} params.timeout - Explicit operation timeout
|
||||
* @param {Date|Number} params.masterTimeout - Specify timeout for connection to master
|
||||
* @param {String|ArrayOfStrings|Boolean} params.index - A comma-separated list of indices to delete; use `_all` or empty string to delete all indices
|
||||
* @param {Date or Number} params.timeout - Explicit operation timeout
|
||||
* @param {Date or Number} params.masterTimeout - Specify timeout for connection to master
|
||||
* @param {String or String[] or Boolean} params.index - A comma-separated list of indices to delete; use `_all` or empty string to delete all indices
|
||||
*/
|
||||
api.indices.prototype['delete'] = ca({
|
||||
methods: [
|
||||
@ -1578,8 +1578,8 @@ api.indices.prototype['delete'] = ca({
|
||||
* Perform a [indices.deleteAlias](http://www.elasticsearch.org/guide/reference/api/admin-indices-aliases/) request
|
||||
*
|
||||
* @param {Object} params - An object with parameters used to carry out this action
|
||||
* @param {Date|Number} params.timeout - Explicit timestamp for the document
|
||||
* @param {Date|Number} params.masterTimeout - Specify timeout for connection to master
|
||||
* @param {Date or Number} params.timeout - Explicit timestamp for the document
|
||||
* @param {Date or Number} params.masterTimeout - Specify timeout for connection to master
|
||||
* @param {String} params.index - The name of the index with an alias
|
||||
* @param {String} params.name - The name of the alias to be deleted
|
||||
*/
|
||||
@ -1616,8 +1616,8 @@ api.indices.prototype.deleteAlias = ca({
|
||||
* Perform a [indices.deleteMapping](http://www.elasticsearch.org/guide/reference/api/admin-indices-delete-mapping/) request
|
||||
*
|
||||
* @param {Object} params - An object with parameters used to carry out this action
|
||||
* @param {Date|Number} params.masterTimeout - Specify timeout for connection to master
|
||||
* @param {String|ArrayOfStrings|Boolean} params.index - A comma-separated list of index names; use `_all` for all indices
|
||||
* @param {Date or Number} params.masterTimeout - Specify timeout for connection to master
|
||||
* @param {String or String[] or Boolean} params.index - A comma-separated list of index names; use `_all` for all indices
|
||||
* @param {String} params.type - The name of the document type to delete
|
||||
*/
|
||||
api.indices.prototype.deleteMapping = ca({
|
||||
@ -1650,8 +1650,8 @@ api.indices.prototype.deleteMapping = ca({
|
||||
* Perform a [indices.deleteTemplate](http://www.elasticsearch.org/guide/reference/api/admin-indices-templates/) request
|
||||
*
|
||||
* @param {Object} params - An object with parameters used to carry out this action
|
||||
* @param {Date|Number} params.timeout - Explicit operation timeout
|
||||
* @param {Date|Number} params.masterTimeout - Specify timeout for connection to master
|
||||
* @param {Date or Number} params.timeout - Explicit operation timeout
|
||||
* @param {Date or Number} params.masterTimeout - Specify timeout for connection to master
|
||||
* @param {String} params.name - The name of the template
|
||||
*/
|
||||
api.indices.prototype.deleteTemplate = ca({
|
||||
@ -1684,10 +1684,10 @@ api.indices.prototype.deleteTemplate = ca({
|
||||
* Perform a [indices.deleteWarmer](http://www.elasticsearch.org/guide/reference/api/admin-indices-warmers/) request
|
||||
*
|
||||
* @param {Object} params - An object with parameters used to carry out this action
|
||||
* @param {Date|Number} params.masterTimeout - Specify timeout for connection to master
|
||||
* @param {String|ArrayOfStrings|Boolean} params.index - A comma-separated list of index names to register warmer for; use `_all` or empty string to perform the operation on all indices
|
||||
* @param {Date or Number} params.masterTimeout - Specify timeout for connection to master
|
||||
* @param {String or String[] or Boolean} params.index - A comma-separated list of index names to register warmer for; use `_all` or empty string to perform the operation on all indices
|
||||
* @param {String} params.name - The name of the warmer (supports wildcards); leave empty to delete all warmers
|
||||
* @param {String|ArrayOfStrings|Boolean} params.type - A comma-separated list of document types to register warmer for; use `_all` or empty string to perform the operation on all types
|
||||
* @param {String or String[] or Boolean} params.type - A comma-separated list of document types to register warmer for; use `_all` or empty string to perform the operation on all types
|
||||
*/
|
||||
api.indices.prototype.deleteWarmer = ca({
|
||||
methods: [
|
||||
@ -1741,7 +1741,7 @@ api.indices.prototype.deleteWarmer = ca({
|
||||
* Perform a [indices.exists](http://www.elasticsearch.org/guide/reference/api/admin-indices-indices-exists/) request
|
||||
*
|
||||
* @param {Object} params - An object with parameters used to carry out this action
|
||||
* @param {String|ArrayOfStrings|Boolean} params.index - A comma-separated list of indices to check
|
||||
* @param {String or String[] or Boolean} params.index - A comma-separated list of indices to check
|
||||
*/
|
||||
api.indices.prototype.exists = ca({
|
||||
methods: [
|
||||
@ -1767,8 +1767,8 @@ api.indices.prototype.exists = ca({
|
||||
*
|
||||
* @param {Object} params - An object with parameters used to carry out this action
|
||||
* @param {String} [params.ignoreIndices=none] - When performed on multiple indices, allows to ignore `missing` ones
|
||||
* @param {String|ArrayOfStrings|Boolean} params.index - A comma-separated list of index names to filter aliases
|
||||
* @param {String|ArrayOfStrings|Boolean} params.name - A comma-separated list of alias names to return
|
||||
* @param {String or String[] or Boolean} params.index - A comma-separated list of index names to filter aliases
|
||||
* @param {String or String[] or Boolean} params.name - A comma-separated list of alias names to return
|
||||
*/
|
||||
api.indices.prototype.existsAlias = ca({
|
||||
methods: [
|
||||
@ -1815,8 +1815,8 @@ api.indices.prototype.existsAlias = ca({
|
||||
*
|
||||
* @param {Object} params - An object with parameters used to carry out this action
|
||||
* @param {String} [params.ignoreIndices=none] - When performed on multiple indices, allows to ignore `missing` ones
|
||||
* @param {String|ArrayOfStrings|Boolean} params.index - A comma-separated list of index names; use `_all` to check the types across all indices
|
||||
* @param {String|ArrayOfStrings|Boolean} params.type - A comma-separated list of document types to check
|
||||
* @param {String or String[] or Boolean} params.index - A comma-separated list of index names; use `_all` to check the types across all indices
|
||||
* @param {String or String[] or Boolean} params.type - A comma-separated list of document types to check
|
||||
*/
|
||||
api.indices.prototype.existsType = ca({
|
||||
methods: [
|
||||
@ -1858,7 +1858,7 @@ api.indices.prototype.existsType = ca({
|
||||
* @param {Boolean} params.full - TODO: ?
|
||||
* @param {String} [params.ignoreIndices=none] - When performed on multiple indices, allows to ignore `missing` ones
|
||||
* @param {Boolean} params.refresh - Refresh the index after performing the operation
|
||||
* @param {String|ArrayOfStrings|Boolean} params.index - A comma-separated list of index names; use `_all` or empty string for all indices
|
||||
* @param {String or String[] or Boolean} params.index - A comma-separated list of index names; use `_all` or empty string for all indices
|
||||
*/
|
||||
api.indices.prototype.flush = ca({
|
||||
methods: [
|
||||
@ -1906,8 +1906,8 @@ api.indices.prototype.flush = ca({
|
||||
*
|
||||
* @param {Object} params - An object with parameters used to carry out this action
|
||||
* @param {String} [params.ignoreIndices=none] - When performed on multiple indices, allows to ignore `missing` ones
|
||||
* @param {String|ArrayOfStrings|Boolean} params.index - A comma-separated list of index names to filter aliases
|
||||
* @param {String|ArrayOfStrings|Boolean} params.name - A comma-separated list of alias names to return
|
||||
* @param {String or String[] or Boolean} params.index - A comma-separated list of index names to filter aliases
|
||||
* @param {String or String[] or Boolean} params.name - A comma-separated list of alias names to return
|
||||
*/
|
||||
api.indices.prototype.getAlias = ca({
|
||||
methods: [
|
||||
@ -1952,8 +1952,8 @@ api.indices.prototype.getAlias = ca({
|
||||
* Perform a [indices.getAliases](http://www.elasticsearch.org/guide/reference/api/admin-indices-aliases/) request
|
||||
*
|
||||
* @param {Object} params - An object with parameters used to carry out this action
|
||||
* @param {Date|Number} params.timeout - Explicit operation timeout
|
||||
* @param {String|ArrayOfStrings|Boolean} params.index - A comma-separated list of index names to filter aliases
|
||||
* @param {Date or Number} params.timeout - Explicit operation timeout
|
||||
* @param {String or String[] or Boolean} params.index - A comma-separated list of index names to filter aliases
|
||||
*/
|
||||
api.indices.prototype.getAliases = ca({
|
||||
methods: [
|
||||
@ -1985,9 +1985,9 @@ api.indices.prototype.getAliases = ca({
|
||||
*
|
||||
* @param {Object} params - An object with parameters used to carry out this action
|
||||
* @param {Boolean} params.includeDefaults - Whether the default mapping values should be returned as well
|
||||
* @param {String|ArrayOfStrings|Boolean} params.index - A comma-separated list of index names
|
||||
* @param {String|ArrayOfStrings|Boolean} params.type - A comma-separated list of document types
|
||||
* @param {String|ArrayOfStrings|Boolean} params.field - A comma-separated list of fields
|
||||
* @param {String or String[] or Boolean} params.index - A comma-separated list of index names
|
||||
* @param {String or String[] or Boolean} params.type - A comma-separated list of document types
|
||||
* @param {String or String[] or Boolean} params.field - A comma-separated list of fields
|
||||
*/
|
||||
api.indices.prototype.getFieldMapping = ca({
|
||||
methods: [
|
||||
@ -2041,8 +2041,8 @@ api.indices.prototype.getFieldMapping = ca({
|
||||
* Perform a [indices.getMapping](http://www.elasticsearch.org/guide/reference/api/admin-indices-get-mapping/) request
|
||||
*
|
||||
* @param {Object} params - An object with parameters used to carry out this action
|
||||
* @param {String|ArrayOfStrings|Boolean} params.index - A comma-separated list of index names
|
||||
* @param {String|ArrayOfStrings|Boolean} params.type - A comma-separated list of document types
|
||||
* @param {String or String[] or Boolean} params.index - A comma-separated list of index names
|
||||
* @param {String or String[] or Boolean} params.type - A comma-separated list of document types
|
||||
*/
|
||||
api.indices.prototype.getMapping = ca({
|
||||
methods: [
|
||||
@ -2080,7 +2080,7 @@ api.indices.prototype.getMapping = ca({
|
||||
* Perform a [indices.getSettings](http://www.elasticsearch.org/guide/reference/api/admin-indices-get-settings/) request
|
||||
*
|
||||
* @param {Object} params - An object with parameters used to carry out this action
|
||||
* @param {String|ArrayOfStrings|Boolean} params.index - A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices
|
||||
* @param {String or String[] or Boolean} params.index - A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices
|
||||
*/
|
||||
api.indices.prototype.getSettings = ca({
|
||||
methods: [
|
||||
@ -2134,9 +2134,9 @@ api.indices.prototype.getTemplate = ca({
|
||||
* Perform a [indices.getWarmer](http://www.elasticsearch.org/guide/reference/api/admin-indices-warmers/) request
|
||||
*
|
||||
* @param {Object} params - An object with parameters used to carry out this action
|
||||
* @param {String|ArrayOfStrings|Boolean} params.index - A comma-separated list of index names to restrict the operation; use `_all` to perform the operation on all indices
|
||||
* @param {String or String[] or Boolean} params.index - A comma-separated list of index names to restrict the operation; use `_all` to perform the operation on all indices
|
||||
* @param {String} params.name - The name of the warmer (supports wildcards); leave empty to get all warmers
|
||||
* @param {String|ArrayOfStrings|Boolean} params.type - A comma-separated list of document types to restrict the operation; leave empty to perform the operation on all types
|
||||
* @param {String or String[] or Boolean} params.type - A comma-separated list of document types to restrict the operation; leave empty to perform the operation on all types
|
||||
*/
|
||||
api.indices.prototype.getWarmer = ca({
|
||||
methods: [
|
||||
@ -2185,8 +2185,8 @@ api.indices.prototype.getWarmer = ca({
|
||||
* Perform a [indices.open](http://www.elasticsearch.org/guide/reference/api/admin-indices-open-close/) request
|
||||
*
|
||||
* @param {Object} params - An object with parameters used to carry out this action
|
||||
* @param {Date|Number} params.timeout - Explicit operation timeout
|
||||
* @param {Date|Number} params.masterTimeout - Specify timeout for connection to master
|
||||
* @param {Date or Number} params.timeout - Explicit operation timeout
|
||||
* @param {Date or Number} params.masterTimeout - Specify timeout for connection to master
|
||||
* @param {String} params.index - The name of the index
|
||||
*/
|
||||
api.indices.prototype.open = ca({
|
||||
@ -2226,7 +2226,7 @@ api.indices.prototype.open = ca({
|
||||
* @param {*} params.operationThreading - TODO: ?
|
||||
* @param {Boolean} params.refresh - Specify whether the index should be refreshed after performing the operation (default: true)
|
||||
* @param {Boolean} params.waitForMerge - Specify whether the request should block until the merge process is finished (default: true)
|
||||
* @param {String|ArrayOfStrings|Boolean} params.index - A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices
|
||||
* @param {String or String[] or Boolean} params.index - A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices
|
||||
*/
|
||||
api.indices.prototype.optimize = ca({
|
||||
methods: [
|
||||
@ -2285,8 +2285,8 @@ api.indices.prototype.optimize = ca({
|
||||
* Perform a [indices.putAlias](http://www.elasticsearch.org/guide/reference/api/admin-indices-aliases/) request
|
||||
*
|
||||
* @param {Object} params - An object with parameters used to carry out this action
|
||||
* @param {Date|Number} params.timeout - Explicit timestamp for the document
|
||||
* @param {Date|Number} params.masterTimeout - Specify timeout for connection to master
|
||||
* @param {Date or Number} params.timeout - Explicit timestamp for the document
|
||||
* @param {Date or Number} params.masterTimeout - Specify timeout for connection to master
|
||||
* @param {String} params.index - The name of the index with an alias
|
||||
* @param {String} params.name - The name of the alias to be created or updated
|
||||
*/
|
||||
@ -2343,9 +2343,9 @@ api.indices.prototype.putAlias = ca({
|
||||
*
|
||||
* @param {Object} params - An object with parameters used to carry out this action
|
||||
* @param {Boolean} params.ignoreConflicts - Specify whether to ignore conflicts while updating the mapping (default: false)
|
||||
* @param {Date|Number} params.timeout - Explicit operation timeout
|
||||
* @param {Date|Number} params.masterTimeout - Specify timeout for connection to master
|
||||
* @param {String|ArrayOfStrings|Boolean} params.index - A comma-separated list of index names; use `_all` to perform the operation on all indices
|
||||
* @param {Date or Number} params.timeout - Explicit operation timeout
|
||||
* @param {Date or Number} params.masterTimeout - Specify timeout for connection to master
|
||||
* @param {String or String[] or Boolean} params.index - A comma-separated list of index names; use `_all` to perform the operation on all indices
|
||||
* @param {String} params.type - The name of the document type
|
||||
*/
|
||||
api.indices.prototype.putMapping = ca({
|
||||
@ -2386,8 +2386,8 @@ api.indices.prototype.putMapping = ca({
|
||||
* Perform a [indices.putSettings](http://www.elasticsearch.org/guide/reference/api/admin-indices-update-settings/) request
|
||||
*
|
||||
* @param {Object} params - An object with parameters used to carry out this action
|
||||
* @param {Date|Number} params.masterTimeout - Specify timeout for connection to master
|
||||
* @param {String|ArrayOfStrings|Boolean} params.index - A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices
|
||||
* @param {Date or Number} params.masterTimeout - Specify timeout for connection to master
|
||||
* @param {String or String[] or Boolean} params.index - A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices
|
||||
*/
|
||||
api.indices.prototype.putSettings = ca({
|
||||
methods: [
|
||||
@ -2420,8 +2420,8 @@ api.indices.prototype.putSettings = ca({
|
||||
*
|
||||
* @param {Object} params - An object with parameters used to carry out this action
|
||||
* @param {Number} params.order - The order for this template when merging multiple matching ones (higher numbers are merged later, overriding the lower numbers)
|
||||
* @param {Date|Number} params.timeout - Explicit operation timeout
|
||||
* @param {Date|Number} params.masterTimeout - Specify timeout for connection to master
|
||||
* @param {Date or Number} params.timeout - Explicit operation timeout
|
||||
* @param {Date or Number} params.masterTimeout - Specify timeout for connection to master
|
||||
* @param {String} params.name - The name of the template
|
||||
*/
|
||||
api.indices.prototype.putTemplate = ca({
|
||||
@ -2458,10 +2458,10 @@ api.indices.prototype.putTemplate = ca({
|
||||
* Perform a [indices.putWarmer](http://www.elasticsearch.org/guide/reference/api/admin-indices-warmers/) request
|
||||
*
|
||||
* @param {Object} params - An object with parameters used to carry out this action
|
||||
* @param {Date|Number} params.masterTimeout - Specify timeout for connection to master
|
||||
* @param {String|ArrayOfStrings|Boolean} params.index - A comma-separated list of index names to register the warmer for; use `_all` or empty string to perform the operation on all indices
|
||||
* @param {Date or Number} params.masterTimeout - Specify timeout for connection to master
|
||||
* @param {String or String[] or Boolean} params.index - A comma-separated list of index names to register the warmer for; use `_all` or empty string to perform the operation on all indices
|
||||
* @param {String} params.name - The name of the warmer
|
||||
* @param {String|ArrayOfStrings|Boolean} params.type - A comma-separated list of document types to register the warmer for; leave empty to perform the operation on all types
|
||||
* @param {String or String[] or Boolean} params.type - A comma-separated list of document types to register the warmer for; leave empty to perform the operation on all types
|
||||
*/
|
||||
api.indices.prototype.putWarmer = ca({
|
||||
methods: [
|
||||
@ -2509,7 +2509,7 @@ api.indices.prototype.putWarmer = ca({
|
||||
* @param {Object} params - An object with parameters used to carry out this action
|
||||
* @param {String} [params.ignoreIndices=none] - When performed on multiple indices, allows to ignore `missing` ones
|
||||
* @param {*} params.operationThreading - TODO: ?
|
||||
* @param {String|ArrayOfStrings|Boolean} params.index - A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices
|
||||
* @param {String or String[] or Boolean} params.index - A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices
|
||||
*/
|
||||
api.indices.prototype.refresh = ca({
|
||||
methods: [
|
||||
@ -2552,7 +2552,7 @@ api.indices.prototype.refresh = ca({
|
||||
* @param {Object} params - An object with parameters used to carry out this action
|
||||
* @param {String} [params.ignoreIndices=none] - When performed on multiple indices, allows to ignore `missing` ones
|
||||
* @param {*} params.operationThreading - TODO: ?
|
||||
* @param {String|ArrayOfStrings|Boolean} params.index - A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices
|
||||
* @param {String or String[] or Boolean} params.index - A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices
|
||||
*/
|
||||
api.indices.prototype.segments = ca({
|
||||
methods: [
|
||||
@ -2593,7 +2593,7 @@ api.indices.prototype.segments = ca({
|
||||
*
|
||||
* @param {Object} params - An object with parameters used to carry out this action
|
||||
* @param {String} [params.ignoreIndices=none] - When performed on multiple indices, allows to ignore `missing` ones
|
||||
* @param {String|ArrayOfStrings|Boolean} params.index - A comma-separated list of index names; use `_all` or empty string for all indices
|
||||
* @param {String or String[] or Boolean} params.index - A comma-separated list of index names; use `_all` or empty string for all indices
|
||||
*/
|
||||
api.indices.prototype.snapshotIndex = ca({
|
||||
methods: [
|
||||
@ -2633,11 +2633,11 @@ api.indices.prototype.snapshotIndex = ca({
|
||||
* @param {Boolean} params.all - Return all available information
|
||||
* @param {Boolean} params.clear - Reset the default level of detail
|
||||
* @param {Boolean} params.completion - Return information about completion suggester stats
|
||||
* @param {String|ArrayOfStrings|Boolean} params.completionFields - A comma-separated list of fields for `completion` metric (supports wildcards)
|
||||
* @param {String or String[] or Boolean} params.completionFields - A comma-separated list of fields for `completion` metric (supports wildcards)
|
||||
* @param {Boolean} params.docs - Return information about indexed and deleted documents
|
||||
* @param {Boolean} params.fielddata - Return information about field data
|
||||
* @param {String|ArrayOfStrings|Boolean} params.fielddataFields - A comma-separated list of fields for `fielddata` metric (supports wildcards)
|
||||
* @param {String|ArrayOfStrings|Boolean} params.fields - A comma-separated list of fields to return detailed information for, when returning the `search` statistics
|
||||
* @param {String or String[] or Boolean} params.fielddataFields - A comma-separated list of fields for `fielddata` metric (supports wildcards)
|
||||
* @param {String or String[] or Boolean} params.fields - A comma-separated list of fields to return detailed information for, when returning the `search` statistics
|
||||
* @param {Boolean} params.filterCache - Return information about filter cache
|
||||
* @param {Boolean} params.flush - Return information about flush operations
|
||||
* @param {Boolean} params.get - Return information about get operations
|
||||
@ -2650,10 +2650,10 @@ api.indices.prototype.snapshotIndex = ca({
|
||||
* @param {Boolean} params.search - Return information about search operations; use the `groups` parameter to include information for specific search groups
|
||||
* @param {Boolean} params.store - Return information about the size of the index
|
||||
* @param {Boolean} params.warmer - Return information about warmers
|
||||
* @param {String|ArrayOfStrings|Boolean} params.index - A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices
|
||||
* @param {String|ArrayOfStrings|Boolean} params.indexingTypes - A comma-separated list of document types to include in the `indexing` statistics
|
||||
* @param {String or String[] or Boolean} params.index - A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices
|
||||
* @param {String or String[] or Boolean} params.indexingTypes - A comma-separated list of document types to include in the `indexing` statistics
|
||||
* @param {String} params.metricFamily - Limit the information returned to a specific metric
|
||||
* @param {String|ArrayOfStrings|Boolean} params.searchGroups - A comma-separated list of search groups to include in the `search` statistics
|
||||
* @param {String or String[] or Boolean} params.searchGroups - A comma-separated list of search groups to include in the `search` statistics
|
||||
*/
|
||||
api.indices.prototype.stats = ca({
|
||||
methods: [
|
||||
@ -2755,7 +2755,7 @@ api.indices.prototype.stats = ca({
|
||||
* @param {*} params.operationThreading - TODO: ?
|
||||
* @param {Boolean} params.recovery - Return information about shard recovery
|
||||
* @param {Boolean} params.snapshot - TODO: ?
|
||||
* @param {String|ArrayOfStrings|Boolean} params.index - A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices
|
||||
* @param {String or String[] or Boolean} params.index - A comma-separated list of index names; use `_all` or empty string to perform the operation on all indices
|
||||
*/
|
||||
api.indices.prototype.status = ca({
|
||||
methods: [
|
||||
@ -2801,9 +2801,9 @@ api.indices.prototype.status = ca({
|
||||
* Perform a [indices.updateAliases](http://www.elasticsearch.org/guide/reference/api/admin-indices-aliases/) request
|
||||
*
|
||||
* @param {Object} params - An object with parameters used to carry out this action
|
||||
* @param {Date|Number} params.timeout - Request timeout
|
||||
* @param {Date|Number} params.masterTimeout - Specify timeout for connection to master
|
||||
* @param {String|ArrayOfStrings|Boolean} params.index - A comma-separated list of index names to filter aliases
|
||||
* @param {Date or Number} params.timeout - Request timeout
|
||||
* @param {Date or Number} params.masterTimeout - Specify timeout for connection to master
|
||||
* @param {String or String[] or Boolean} params.index - A comma-separated list of index names to filter aliases
|
||||
*/
|
||||
api.indices.prototype.updateAliases = ca({
|
||||
methods: [
|
||||
@ -2835,8 +2835,8 @@ api.indices.prototype.updateAliases = ca({
|
||||
* @param {*} params.operationThreading - TODO: ?
|
||||
* @param {String} params.source - The URL-encoded query definition (instead of using the request body)
|
||||
* @param {String} params.q - Query in the Lucene query string syntax
|
||||
* @param {String|ArrayOfStrings|Boolean} params.index - A comma-separated list of index names to restrict the operation; use `_all` or empty string to perform the operation on all indices
|
||||
* @param {String|ArrayOfStrings|Boolean} params.type - A comma-separated list of document types to restrict the operation; leave empty to perform the operation on all types
|
||||
* @param {String or String[] or Boolean} params.index - A comma-separated list of index names to restrict the operation; use `_all` or empty string to perform the operation on all indices
|
||||
* @param {String or String[] or Boolean} params.type - A comma-separated list of document types to restrict the operation; leave empty to perform the operation on all types
|
||||
*/
|
||||
api.indices.prototype.validateQuery = ca({
|
||||
methods: [
|
||||
@ -2916,13 +2916,13 @@ api.info = ca({
|
||||
* Perform a [mget](http://elasticsearch.org/guide/reference/api/multi-get/) request
|
||||
*
|
||||
* @param {Object} params - An object with parameters used to carry out this action
|
||||
* @param {String|ArrayOfStrings|Boolean} params.fields - A comma-separated list of fields to return in the response
|
||||
* @param {String or String[] or Boolean} params.fields - A comma-separated list of fields to return in the response
|
||||
* @param {String} params.preference - Specify the node or shard the operation should be performed on (default: random)
|
||||
* @param {Boolean} params.realtime - Specify whether to perform the operation in realtime or search mode
|
||||
* @param {Boolean} params.refresh - Refresh the shard containing the document before performing the operation
|
||||
* @param {String|ArrayOfStrings|Boolean} params.source - True or false to return the _source field or not, or a list of fields to return
|
||||
* @param {String|ArrayOfStrings|Boolean} params.sourceExclude - A list of fields to exclude from the returned _source field
|
||||
* @param {String|ArrayOfStrings|Boolean} params.sourceInclude - A list of fields to extract and return from the _source field
|
||||
* @param {String or String[] or Boolean} params.source - True or false to return the _source field or not, or a list of fields to return
|
||||
* @param {String or String[] or Boolean} params.sourceExclude - A list of fields to exclude from the returned _source field
|
||||
* @param {String or String[] or Boolean} params.sourceInclude - A list of fields to extract and return from the _source field
|
||||
* @param {String} params.index - The name of the index
|
||||
* @param {String} params.type - The type of the document
|
||||
*/
|
||||
@ -2995,18 +2995,18 @@ api.mget = ca({
|
||||
* @param {Number} params.minDocFreq - The word occurrence frequency as count: words with lower occurrence in the corpus will be ignored
|
||||
* @param {Number} params.minTermFreq - The term frequency as percent: terms with lower occurence in the source document will be ignored
|
||||
* @param {Number} params.minWordLen - The minimum length of the word: shorter words will be ignored
|
||||
* @param {String|ArrayOfStrings|Boolean} params.mltFields - Specific fields to perform the query against
|
||||
* @param {String or String[] or Boolean} params.mltFields - Specific fields to perform the query against
|
||||
* @param {Number} params.percentTermsToMatch - How many terms have to match in order to consider the document a match (default: 0.3)
|
||||
* @param {String} params.routing - Specific routing value
|
||||
* @param {Number} params.searchFrom - The offset from which to return results
|
||||
* @param {String|ArrayOfStrings|Boolean} params.searchIndices - A comma-separated list of indices to perform the query against (default: the index containing the document)
|
||||
* @param {String or String[] or Boolean} params.searchIndices - A comma-separated list of indices to perform the query against (default: the index containing the document)
|
||||
* @param {String} params.searchQueryHint - The search query hint
|
||||
* @param {String} params.searchScroll - A scroll search request definition
|
||||
* @param {Number} params.searchSize - The number of documents to return (default: 10)
|
||||
* @param {String} params.searchSource - A specific search request definition (instead of using the request body)
|
||||
* @param {String} params.searchType - Specific search type (eg. `dfs_then_fetch`, `count`, etc)
|
||||
* @param {String|ArrayOfStrings|Boolean} params.searchTypes - A comma-separated list of types to perform the query against (default: the same type as the document)
|
||||
* @param {String|ArrayOfStrings|Boolean} params.stopWords - A list of stop words to be ignored
|
||||
* @param {String or String[] or Boolean} params.searchTypes - A comma-separated list of types to perform the query against (default: the same type as the document)
|
||||
* @param {String or String[] or Boolean} params.stopWords - A list of stop words to be ignored
|
||||
* @param {String} params.id - The document ID
|
||||
* @param {String} params.index - The name of the index
|
||||
* @param {String} params.type - The type of the document (use `_all` to fetch the first document matching the ID across all types)
|
||||
@ -3117,8 +3117,8 @@ api.mlt = ca({
|
||||
*
|
||||
* @param {Object} params - An object with parameters used to carry out this action
|
||||
* @param {String} params.searchType - Search operation type
|
||||
* @param {String|ArrayOfStrings|Boolean} params.index - A comma-separated list of index names to use as default
|
||||
* @param {String|ArrayOfStrings|Boolean} params.type - A comma-separated list of document types to use as default
|
||||
* @param {String or String[] or Boolean} params.index - A comma-separated list of index names to use as default
|
||||
* @param {String or String[] or Boolean} params.type - A comma-separated list of document types to use as default
|
||||
*/
|
||||
api.msearch = ca({
|
||||
methods: [
|
||||
@ -3248,31 +3248,31 @@ api.scroll = ca({
|
||||
* @param {String} [params.defaultOperator=OR] - The default operator for query string query (AND or OR)
|
||||
* @param {String} params.df - The field to use as default where no field prefix is given in the query string
|
||||
* @param {Boolean} params.explain - Specify whether to return detailed information about score computation as part of a hit
|
||||
* @param {String|ArrayOfStrings|Boolean} params.fields - A comma-separated list of fields to return as part of a hit
|
||||
* @param {String or String[] or Boolean} params.fields - A comma-separated list of fields to return as part of a hit
|
||||
* @param {Number} params.from - Starting offset (default: 0)
|
||||
* @param {String} [params.ignoreIndices=none] - When performed on multiple indices, allows to ignore `missing` ones
|
||||
* @param {String|ArrayOfStrings|Boolean} params.indicesBoost - Comma-separated list of index boosts
|
||||
* @param {String or String[] or Boolean} params.indicesBoost - Comma-separated list of index boosts
|
||||
* @param {Boolean} params.lenient - Specify whether format-based query failures (such as providing text to a numeric field) should be ignored
|
||||
* @param {Boolean} params.lowercaseExpandedTerms - Specify whether query terms should be lowercased
|
||||
* @param {String} params.preference - Specify the node or shard the operation should be performed on (default: random)
|
||||
* @param {String} params.q - Query in the Lucene query string syntax
|
||||
* @param {String|ArrayOfStrings|Boolean} params.routing - A comma-separated list of specific routing values
|
||||
* @param {String or String[] or Boolean} params.routing - A comma-separated list of specific routing values
|
||||
* @param {Duration} params.scroll - Specify how long a consistent view of the index should be maintained for scrolled search
|
||||
* @param {String} params.searchType - Search operation type
|
||||
* @param {Number} params.size - Number of hits to return (default: 10)
|
||||
* @param {String|ArrayOfStrings|Boolean} params.sort - A comma-separated list of <field>:<direction> pairs
|
||||
* @param {String|ArrayOfStrings|Boolean} params.source - True or false to return the _source field or not, or a list of fields to return
|
||||
* @param {String|ArrayOfStrings|Boolean} params.sourceExclude - A list of fields to exclude from the returned _source field
|
||||
* @param {String|ArrayOfStrings|Boolean} params.sourceInclude - A list of fields to extract and return from the _source field
|
||||
* @param {String|ArrayOfStrings|Boolean} params.stats - Specific 'tag' of the request for logging and statistical purposes
|
||||
* @param {String or String[] or Boolean} params.sort - A comma-separated list of <field>:<direction> pairs
|
||||
* @param {String or String[] or Boolean} params.source - True or false to return the _source field or not, or a list of fields to return
|
||||
* @param {String or String[] or Boolean} params.sourceExclude - A list of fields to exclude from the returned _source field
|
||||
* @param {String or String[] or Boolean} params.sourceInclude - A list of fields to extract and return from the _source field
|
||||
* @param {String or String[] or Boolean} params.stats - Specific 'tag' of the request for logging and statistical purposes
|
||||
* @param {String} params.suggestField - Specify which field to use for suggestions
|
||||
* @param {String} [params.suggestMode=missing] - Specify suggest mode
|
||||
* @param {Number} params.suggestSize - How many suggestions to return in response
|
||||
* @param {Text} params.suggestText - The source text for which the suggestions should be returned
|
||||
* @param {Date|Number} params.timeout - Explicit operation timeout
|
||||
* @param {Date or Number} params.timeout - Explicit operation timeout
|
||||
* @param {Boolean} params.version - Specify whether to return document version as part of a hit
|
||||
* @param {String|ArrayOfStrings|Boolean} [params.index=_all] - A comma-separated list of index names to search; use `_all` or empty string to perform the operation on all indices
|
||||
* @param {String|ArrayOfStrings|Boolean} params.type - A comma-separated list of document types to search; leave empty to perform the operation on all types
|
||||
* @param {String or String[] or Boolean} [params.index=_all] - A comma-separated list of index names to search; use `_all` or empty string to perform the operation on all indices
|
||||
* @param {String or String[] or Boolean} params.type - A comma-separated list of document types to search; leave empty to perform the operation on all types
|
||||
*/
|
||||
api.search = ca({
|
||||
methods: [
|
||||
@ -3438,7 +3438,7 @@ api.search = ca({
|
||||
* @param {String} params.preference - Specify the node or shard the operation should be performed on (default: random)
|
||||
* @param {String} params.routing - Specific routing value
|
||||
* @param {String} params.source - The URL-encoded request definition (instead of using request body)
|
||||
* @param {String|ArrayOfStrings|Boolean} params.index - A comma-separated list of index names to restrict the operation; use `_all` or empty string to perform the operation on all indices
|
||||
* @param {String or String[] or Boolean} params.index - A comma-separated list of index names to restrict the operation; use `_all` or empty string to perform the operation on all indices
|
||||
*/
|
||||
api.suggest = ca({
|
||||
methods: [
|
||||
@ -3486,7 +3486,7 @@ api.suggest = ca({
|
||||
*
|
||||
* @param {Object} params - An object with parameters used to carry out this action
|
||||
* @param {String} params.consistency - Explicit write consistency setting for the operation
|
||||
* @param {String|ArrayOfStrings|Boolean} params.fields - A comma-separated list of fields to return in the response
|
||||
* @param {String or String[] or Boolean} params.fields - A comma-separated list of fields to return in the response
|
||||
* @param {String} params.lang - The script language (default: mvel)
|
||||
* @param {String} params.parent - ID of the parent document
|
||||
* @param {String} params.percolate - Perform percolation during the operation; use specific registered query name, attribute, or wildcard
|
||||
@ -3495,8 +3495,8 @@ api.suggest = ca({
|
||||
* @param {Number} params.retryOnConflict - Specify how many times should the operation be retried when a conflict occurs (default: 0)
|
||||
* @param {String} params.routing - Specific routing value
|
||||
* @param {*} params.script - The URL-encoded script definition (instead of using request body)
|
||||
* @param {Date|Number} params.timeout - Explicit operation timeout
|
||||
* @param {Date|Number} params.timestamp - Explicit timestamp for the document
|
||||
* @param {Date or Number} params.timeout - Explicit operation timeout
|
||||
* @param {Date or Number} params.timestamp - Explicit timestamp for the document
|
||||
* @param {Duration} params.ttl - Expiration time for the document
|
||||
* @param {Number} params.version - Explicit version number for concurrency control
|
||||
* @param {String} params.versionType - Specific version type
|
||||
|
||||
@ -52,12 +52,14 @@ HttpConnector.prototype.makeReqParams = function (params) {
|
||||
auth: this.host.auth,
|
||||
hostname: this.host.host,
|
||||
port: this.host.port,
|
||||
path: this.host.path + params.path,
|
||||
pathname: this.host.path + params.path,
|
||||
headers: this.host.headers,
|
||||
agent: this.agent
|
||||
};
|
||||
|
||||
var query = this.host.query ? this.host.query : null;
|
||||
var queryStr;
|
||||
|
||||
if (typeof query === 'string') {
|
||||
query = qs.parse(query);
|
||||
}
|
||||
@ -70,11 +72,10 @@ HttpConnector.prototype.makeReqParams = function (params) {
|
||||
}
|
||||
|
||||
if (query) {
|
||||
queryStr = qs.stringify(query);
|
||||
}
|
||||
|
||||
if (queryStr) {
|
||||
reqParams.path = reqParams.path + '?' + queryStr;
|
||||
reqParams.query = query;
|
||||
reqParams.path = reqParams.pathname + '?' + qs.stringify(query);
|
||||
} else {
|
||||
reqParams.path = reqParams.pathname;
|
||||
}
|
||||
|
||||
return reqParams;
|
||||
|
||||
@ -285,6 +285,11 @@ Log.prototype.trace = function (method, requestUrl, body, responseBody, response
|
||||
}, requestUrl.query)
|
||||
}, requestUrl);
|
||||
delete requestUrl.auth;
|
||||
|
||||
if (!requestUrl.pathname && requestUrl.path) {
|
||||
requestUrl.pathname = requestUrl.path.split('?').shift();
|
||||
}
|
||||
|
||||
return this.emit('trace', method, url.format(requestUrl), body, responseBody, responseStatus);
|
||||
}
|
||||
};
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user