Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
dist
docs
npm-debug.log
node_modules
scripts/scratch*
Expand Down
1 change: 1 addition & 0 deletions docs/README.asciidoc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
= These files are used to build http://www.elasticsearch.org/guide/en/elasticsearch/client/javascript-api/current/index.html
1 change: 1 addition & 0 deletions docs/_descriptions/bulk.asciidoc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Perform many index/delete operations in a single API call.
1 change: 1 addition & 0 deletions docs/_descriptions/clearScroll.asciidoc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Clear the scroll request created by specifying the scroll parameter to search.
1 change: 1 addition & 0 deletions docs/_descriptions/cluster.getSettings.asciidoc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Get cluster settings (previously set with `putSettings()`)
1 change: 1 addition & 0 deletions docs/_descriptions/cluster.health.asciidoc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Get a very simple status on the health of the cluster.
3 changes: 3 additions & 0 deletions docs/_descriptions/cluster.nodeHotThreads.asciidoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
Returns information about the hottest threads in the cluster or on a specific node as a String. The information is returned as text, and allows you to understand what are currently the most taxing operations happening in the cluster, for debugging or monitoring purposes.

WARNING: This endpoint returns plain text
1 change: 1 addition & 0 deletions docs/_descriptions/cluster.nodeInfo.asciidoc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Retrieve one or more (or all) of the cluster nodes' information.
1 change: 1 addition & 0 deletions docs/_descriptions/cluster.nodeShutdown.asciidoc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Shutdown one or more (or all) nodes in the cluster.
1 change: 1 addition & 0 deletions docs/_descriptions/cluster.nodeStats.asciidoc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Retrieve one or more (or all) of the cluster nodes statistics.
1 change: 1 addition & 0 deletions docs/_descriptions/cluster.putSettings.asciidoc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Update cluster wide specific settings.
1 change: 1 addition & 0 deletions docs/_descriptions/cluster.reroute.asciidoc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Explicitly execute a cluster reroute allocation command including specific commands.
1 change: 1 addition & 0 deletions docs/_descriptions/cluster.state.asciidoc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Get comprehensive details about the state of the whole cluster (indices settings, allocations, etc).
1 change: 1 addition & 0 deletions docs/_descriptions/count.asciidoc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Get the number of documents for the cluster, index, type, or a query.
1 change: 1 addition & 0 deletions docs/_descriptions/create.asciidoc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Adds a typed JSON document in a specific index, making it searchable. If a document with the same `index`, `type`, and `id` already exists, an error will occur.
1 change: 1 addition & 0 deletions docs/_descriptions/delete.asciidoc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Delete a typed JSON document from a specific index based on its id.
1 change: 1 addition & 0 deletions docs/_descriptions/deleteByQuery.asciidoc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Delete documents from one or more indices and one or more types based on a query.
1 change: 1 addition & 0 deletions docs/_descriptions/exists.asciidoc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Returns a boolean indicating whether or not a given document exists.
1 change: 1 addition & 0 deletions docs/_descriptions/explain.asciidoc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Provides details about a specific document's score in relation to a specific query. It will also tell you if the document matches the specified query. Also check out http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/search-percolate.html[percolaters].
1 change: 1 addition & 0 deletions docs/_descriptions/get.asciidoc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Get a typed JSON document from the index based on its id.
1 change: 1 addition & 0 deletions docs/_descriptions/getSource.asciidoc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Get the source of a document by it's index, type and id.
5 changes: 5 additions & 0 deletions docs/_descriptions/index.asciidoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Stores a typed JSON document in an index, making it searchable. When the `id` param is not set, a unique id will be auto-generated. When you specify an `id` either a new document will be created, or an existing document will be updated. To enforce "put-if-absent" behavior set the `opType` to `"create"` or use the `create()` method.

Optimistic concurrency control is performed, when the `version` argument is specified. By default, no version checks are performed.

By default, the document will be available for `get()` actions immediately, but will only be available for searching after an index refresh (which can happen automatically or manually). See <<api-indices-refresh>>.
1 change: 1 addition & 0 deletions docs/_descriptions/indices.analyze.asciidoc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Perform the analysis process on a text and return the tokens breakdown of the text.
1 change: 1 addition & 0 deletions docs/_descriptions/indices.clearCache.asciidoc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Clear either all caches or specific cached associated with one ore more indices.
1 change: 1 addition & 0 deletions docs/_descriptions/indices.close.asciidoc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Close an index to remove it's overhead from the cluster. Closed index is blocked for read/write operations.
1 change: 1 addition & 0 deletions docs/_descriptions/indices.create.asciidoc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Create an index in Elasticsearch.
1 change: 1 addition & 0 deletions docs/_descriptions/indices.delete.asciidoc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Delete an index in Elasticsearch
1 change: 1 addition & 0 deletions docs/_descriptions/indices.deleteAlias.asciidoc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Delete a specific alias.
1 change: 1 addition & 0 deletions docs/_descriptions/indices.deleteMapping.asciidoc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Delete a mapping (type definition) along with its data.
1 change: 1 addition & 0 deletions docs/_descriptions/indices.deleteTemplate.asciidoc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Delete an index template by its name.
1 change: 1 addition & 0 deletions docs/_descriptions/indices.deleteWarmer.asciidoc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Delete an index warmer.
1 change: 1 addition & 0 deletions docs/_descriptions/indices.exists.asciidoc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Return a boolean indicating whether given index exists.
1 change: 1 addition & 0 deletions docs/_descriptions/indices.existsAlias.asciidoc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Return a boolean indicating whether given alias exists.
1 change: 1 addition & 0 deletions docs/_descriptions/indices.existsType.asciidoc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Check if a type/types exists in an index/indices.
1 change: 1 addition & 0 deletions docs/_descriptions/indices.flush.asciidoc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Explicitly flush one or more indices.
1 change: 1 addition & 0 deletions docs/_descriptions/indices.getAlias.asciidoc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Retrieve a specified alias.
1 change: 1 addition & 0 deletions docs/_descriptions/indices.getAliases.asciidoc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Retrieve specified aliases
1 change: 1 addition & 0 deletions docs/_descriptions/indices.getFieldMapping.asciidoc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Retrieve mapping definition of a specific field.
1 change: 1 addition & 0 deletions docs/_descriptions/indices.getMapping.asciidoc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Retrieve mapping definition of index or index/type.
1 change: 1 addition & 0 deletions docs/_descriptions/indices.getSettings.asciidoc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Retrieve settings for one or more (or all) indices.
1 change: 1 addition & 0 deletions docs/_descriptions/indices.getTemplate.asciidoc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Retrieve an index template by its name.
1 change: 1 addition & 0 deletions docs/_descriptions/indices.getWarmer.asciidoc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Retreieve an index warmer.
1 change: 1 addition & 0 deletions docs/_descriptions/indices.open.asciidoc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Open a closed index, making it available for search.
1 change: 1 addition & 0 deletions docs/_descriptions/indices.optimize.asciidoc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Explicitly optimize one or more indices.
1 change: 1 addition & 0 deletions docs/_descriptions/indices.putAlias.asciidoc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Create an alias for a specific index/indices.
1 change: 1 addition & 0 deletions docs/_descriptions/indices.putMapping.asciidoc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Register specific mapping definition for a specific type.
1 change: 1 addition & 0 deletions docs/_descriptions/indices.putSettings.asciidoc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Change specific index level settings in real time.
1 change: 1 addition & 0 deletions docs/_descriptions/indices.putTemplate.asciidoc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Create an index template that will automatically be applied to new indices created.
1 change: 1 addition & 0 deletions docs/_descriptions/indices.putWarmer.asciidoc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Create an index warmer to run registered search requests to warm up the index before it is available for search.
1 change: 1 addition & 0 deletions docs/_descriptions/indices.refresh.asciidoc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Explicitly refresh one or more index, making all operations performed since the last refresh available for search.
1 change: 1 addition & 0 deletions docs/_descriptions/indices.segments.asciidoc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Retrieve low level segments information that a Lucene index (shard level) is built with.
1 change: 1 addition & 0 deletions docs/_descriptions/indices.snapshotIndex.asciidoc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Initiate a snapshot through the gateway of one or more indices.
1 change: 1 addition & 0 deletions docs/_descriptions/indices.stats.asciidoc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Retrieve statistics on different operations happening on an index.
1 change: 1 addition & 0 deletions docs/_descriptions/indices.status.asciidoc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Get a comprehensive status information of one or more indices.
1 change: 1 addition & 0 deletions docs/_descriptions/indices.updateAliases.asciidoc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Update specified aliases.
1 change: 1 addition & 0 deletions docs/_descriptions/indices.validateQuery.asciidoc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Validate a potentially expensive query without executing it.
1 change: 1 addition & 0 deletions docs/_descriptions/info.asciidoc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Get basic info from the current cluster.
1 change: 1 addition & 0 deletions docs/_descriptions/mget.asciidoc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Get multiple documents based on an index, type (optional) and ids. The body required by mget can take two forms: an array of document locations, or an array of document ids.
1 change: 1 addition & 0 deletions docs/_descriptions/mlt.asciidoc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
(more like this) Gets more documents that are “like” the document specified using `index`, `type`, and `id`.
1 change: 1 addition & 0 deletions docs/_descriptions/msearch.asciidoc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Execute several search requests within the same request.
1 change: 1 addition & 0 deletions docs/_descriptions/percolate.asciidoc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Match a document against registered percolator queries.
1 change: 1 addition & 0 deletions docs/_descriptions/scroll.asciidoc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Scroll a search request (retrieve the next set of results) after specifying the scroll parameter in a `search()` call.
4 changes: 4 additions & 0 deletions docs/_descriptions/search.asciidoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Return documents matching a query, aggregations/facets, highlighted snippets, suggestions, and more. Write your queries as either http://www.elasticsearch.org/guide/reference/api/search/uri-request/[simple query strings] in the `q` parameter, or by specifying a http://www.elasticsearch.org/guide/reference/api/search/request-body/[full request definition] using the http://www.elasticsearch.org/guide/reference/query-dsl/[Elasticsearch Query DSL] in the `body` parameter.

TIP: https://github.com/fullscale/elastic.js[elastic.js] can be used to make building query bodies easier.

1 change: 1 addition & 0 deletions docs/_descriptions/suggest.asciidoc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
The suggest feature suggests similar looking terms based on a provided text by using a specific suggester.
4 changes: 4 additions & 0 deletions docs/_descriptions/update.asciidoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Update parts of a document. The required body parameter can contain one of two things:

* a partial document, which will be merged with the existing one.
* a `script` which will update the document content
21 changes: 21 additions & 0 deletions docs/_examples/bulk.asciidoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
.Perform three operations in a single request
[source,js]
---------
client.bulk({
body: [
// action description
{ index: { _index: 'myindex', _type: 'mytype', _id: 1 } },
// the document to index
{ title: 'foo' },
// action description
{ update: { _index: 'myindex', _type: 'mytype', _id: 2 } },
// the document to update
{ doc: { title: 'foo' } },
// action description
{ delete: { _index: 'myindex', _type: 'mytype', _id: 3 } },
// no document needed for this delete
]
}, function (err, resp) {
// ...
});
---------
11 changes: 11 additions & 0 deletions docs/_examples/cluster.nodeHotThreads.asciidoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
.Return 10 hottest threads
[source,js]
---------
client.cluster.nodeHotThreads({
threads: 10
nodeId: 'mymisbehavingnode',
maxRetries: 10
}, function (error, response) {
console.log(response);
})
---------
10 changes: 10 additions & 0 deletions docs/_examples/cluster.nodeInfo.asciidoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
.Return information about JVM
[source,js]
---------
client.cluster.nodeInfo({ jvm: true })
.then(function (response) {
// enjoy your sweet info!
}, function (error) {
// scream!
})
---------
37 changes: 37 additions & 0 deletions docs/_examples/count.asciidoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
.Get the number of all documents in the cluster
[source,js]
---------
client.count(function (error, response, status) {
// check for and handle error
var count = response.count;
});
---------

.Get the number of documents in an index
[source,js]
---------
client.count({
index: 'index_name'
}, function (error, response) {
// ...
});
---------

.Get the number of documents matching a query
[source,js]
---------
client.count(
index: 'index_name',
body: {
filtered: {
filter: {
terms: {
foo: ['bar']
}
}
}
}
}, function (err, response) {
// ...
});
---------
18 changes: 18 additions & 0 deletions docs/_examples/create.asciidoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
.Create a document
[source,js]
---------
client.create({
index: 'myindex',
type: 'mytype',
id: '1',
body: {
title: 'Test 1',
tags: ['y', 'z'],
published: true,
published_at: '2013-01-01',
counter: 1
}
}, function (error, response) {
// ...
});
---------
11 changes: 11 additions & 0 deletions docs/_examples/delete.asciidoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
.Delete the document `/myindex/mytype/1`
[source,js]
---------
client.delete({
index: 'myindex',
type: 'mytype',
id: '1'
}, function (error, response) {
// ...
});
---------
23 changes: 23 additions & 0 deletions docs/_examples/deleteByQuery.asciidoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
.Deleting documents with a simple query
[source,js]
---------
client.deleteByQuery({
index: 'myindex',
q: 'test'
}, function (error, response) {
// ...
});
---------

.Deleting documents using the Query DSL
[source,js]
---------
client.delete_by_query({
index: 'posts',
body: {
term: { published: false }
}
}, function (error, response) {
// ...
});
---------
15 changes: 15 additions & 0 deletions docs/_examples/exists.asciidoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
.Check that the document `/myindex/mytype/1` exits
[source,js]
---------
client.exists({
index: 'myindex',
type: 'mytype',
id: 1
}, function (error, exists) {
if (exists === true) {
// ...
} else {
// ...
}
});
---------
Loading