updated the API, fixed the config docs, added a method list to the API pages
This commit is contained in:
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -44,8 +44,8 @@ Default in Node:::
|
|||||||
|
|
||||||
|
|
||||||
`apiVersion`[[config-api-version]]:: `String` -- Change the API that they client provides, specify the major version of the Elasticsearch nodes you will be connecting to.
|
`apiVersion`[[config-api-version]]:: `String` -- Change the API that they client provides, specify the major version of the Elasticsearch nodes you will be connecting to.
|
||||||
|
+
|
||||||
WARNING: This default will track the latest version of Elasticsearch, and is only intended to be used durring develoopment. It is highly recommended that you set this parameter in all code that is headed to production.
|
WARNING: This default will track the latest version of Elasticsearch, and is only intended to be used durring development. It is highly recommended that you set this parameter in all code that is headed to production.
|
||||||
|
|
||||||
Default ::: `"0.90"`
|
Default ::: `"0.90"`
|
||||||
|
|
||||||
|
|||||||
@ -6,10 +6,6 @@ include::quick_start.asciidoc[]
|
|||||||
|
|
||||||
include::api_conventions.asciidoc[]
|
include::api_conventions.asciidoc[]
|
||||||
|
|
||||||
include::api_methods.asciidoc[]
|
|
||||||
|
|
||||||
include::api_methods_0_90.asciidoc[]
|
|
||||||
|
|
||||||
include::configuration.asciidoc[]
|
include::configuration.asciidoc[]
|
||||||
|
|
||||||
include::extending_core_components.asciidoc[]
|
include::extending_core_components.asciidoc[]
|
||||||
@ -18,6 +14,10 @@ include::logging.asciidoc[]
|
|||||||
|
|
||||||
include::development.asciidoc[]
|
include::development.asciidoc[]
|
||||||
|
|
||||||
|
include::api_methods.asciidoc[]
|
||||||
|
|
||||||
|
include::api_methods_0_90.asciidoc[]
|
||||||
|
|
||||||
include::errors.asciidoc[]
|
include::errors.asciidoc[]
|
||||||
|
|
||||||
include::transport.asciidoc[]
|
include::transport.asciidoc[]
|
||||||
@ -2,6 +2,7 @@ var cp = require('child_process');
|
|||||||
var async = require('async');
|
var async = require('async');
|
||||||
var estream = require('event-stream');
|
var estream = require('event-stream');
|
||||||
var chalk = require('chalk');
|
var chalk = require('chalk');
|
||||||
|
var _ = require('lodash');
|
||||||
var argv = require('optimist')
|
var argv = require('optimist')
|
||||||
.options({
|
.options({
|
||||||
force: {
|
force: {
|
||||||
@ -22,10 +23,9 @@ var argv = require('optimist')
|
|||||||
default: true,
|
default: true,
|
||||||
boolean: true
|
boolean: true
|
||||||
},
|
},
|
||||||
es_branch: {
|
update: {
|
||||||
default: 'master',
|
default: true,
|
||||||
string: true,
|
boolean: true
|
||||||
alias: 'b'
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -109,12 +109,18 @@ function generateBranch(branch, done) {
|
|||||||
], done);
|
], done);
|
||||||
}
|
}
|
||||||
|
|
||||||
async.series([
|
var steps = [
|
||||||
initSubmodule,
|
initSubmodule,
|
||||||
fetch,
|
fetch,
|
||||||
async.apply(generateBranch, '0.90'),
|
async.apply(generateBranch, '0.90'),
|
||||||
async.apply(generateBranch, 'master')
|
async.apply(generateBranch, 'master')
|
||||||
], function (err) {
|
];
|
||||||
|
|
||||||
|
if (!argv.update) {
|
||||||
|
steps = _.without(steps, fetch);
|
||||||
|
}
|
||||||
|
|
||||||
|
async.series(steps, function (err) {
|
||||||
if (err) {
|
if (err) {
|
||||||
throw err;
|
throw err;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -244,6 +244,7 @@ module.exports = function (branch, done) {
|
|||||||
location: location,
|
location: location,
|
||||||
docUrl: def.documentation,
|
docUrl: def.documentation,
|
||||||
name: spec.name,
|
name: spec.name,
|
||||||
|
namespace: spec.name.split('.').slice(0, -1).join('.'),
|
||||||
allParams: allParams
|
allParams: allParams
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@ -3,17 +3,29 @@
|
|||||||
if ( branch === 'master' ) {%>
|
if ( branch === 'master' ) {%>
|
||||||
== 1.0 API
|
== 1.0 API
|
||||||
|
|
||||||
NOTE: At this time, you must opt into the 1.0 API by setting the `apiVerion` config parameter.<%
|
NOTE: At this time, you must opt into the 1.0 API by setting the `apiVerion` config parameter.
|
||||||
|
|
||||||
|
<%
|
||||||
} else {%>
|
} else {%>
|
||||||
== 0.90 API
|
== 0.90 API
|
||||||
|
|
||||||
NOTE: This is currently the default API, but with the upcoming release of Elasticsearch 1.0 that will change. We recommend setting the `apiVersion` config param when you instantiate your client to make sure that the API does not change when the default does.<%
|
NOTE: This is currently the default API, but with the upcoming release of Elasticsearch 1.0 that will change. We recommend setting the `apiVersion` config param when you instantiate your client to make sure that the API does not change when the default does.
|
||||||
|
|
||||||
|
<%
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// method index%>
|
||||||
|
[[js-api-method-index]]<%
|
||||||
|
actions = _.sortBy(actions, 'namespace');
|
||||||
|
_.each(actions, function (action) {
|
||||||
|
action.index = 'api-' + action.name.toLowerCase().replace(/[^\w]+/g, '-') + branchSuffix; %>
|
||||||
|
* <%= '<<' + action.index + ',' + action.name + '>>' %><%
|
||||||
|
})
|
||||||
|
|
||||||
_.each(actions, function (action) {
|
_.each(actions, function (action) {
|
||||||
%>
|
%>
|
||||||
|
|
||||||
[[<%= 'api-' + action.name.toLowerCase().replace(/[^\w]+/g, '-') + branchSuffix %>]]
|
[[<%= action.index %>]]
|
||||||
=== `<%= action.name %>`
|
=== `<%= action.name %>`
|
||||||
|
|
||||||
[source,js]
|
[source,js]
|
||||||
@ -35,7 +47,10 @@ _.each(action.allParams, function (param, paramName) { %>
|
|||||||
`<%= paramWithDefault(paramName, param.default) %>`::
|
`<%= paramWithDefault(paramName, param.default) %>`::
|
||||||
`<%= paramType(param.type) %>` -- <%= joinParagraphs(param.description || '', 4) %><%
|
`<%= paramType(param.type) %>` -- <%= joinParagraphs(param.description || '', 4) %><%
|
||||||
|
|
||||||
}); // endeach
|
}); // endeach %>
|
||||||
|
|
||||||
|
link:#[back to top]<%
|
||||||
|
|
||||||
} // endif
|
} // endif
|
||||||
|
|
||||||
}); // endeach
|
}); // endeach
|
||||||
|
|||||||
Submodule src/elasticsearch updated: fe60cca038...67efe8777a
@ -1700,19 +1700,14 @@ api.indices.prototype.close = ca({
|
|||||||
name: 'expand_wildcards'
|
name: 'expand_wildcards'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
urls: [
|
url: {
|
||||||
{
|
fmt: '/<%=index%>/_close',
|
||||||
fmt: '/<%=index%>/_close',
|
req: {
|
||||||
req: {
|
index: {
|
||||||
index: {
|
type: 'string'
|
||||||
type: 'string'
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
},
|
|
||||||
{
|
|
||||||
fmt: '/_close'
|
|
||||||
}
|
}
|
||||||
],
|
},
|
||||||
method: 'POST'
|
method: 'POST'
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -1763,19 +1758,14 @@ api.indices.prototype['delete'] = ca({
|
|||||||
name: 'master_timeout'
|
name: 'master_timeout'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
urls: [
|
url: {
|
||||||
{
|
fmt: '/<%=index%>',
|
||||||
fmt: '/<%=index%>',
|
req: {
|
||||||
req: {
|
index: {
|
||||||
index: {
|
type: 'list'
|
||||||
type: 'list'
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
},
|
|
||||||
{
|
|
||||||
fmt: '/'
|
|
||||||
}
|
}
|
||||||
],
|
},
|
||||||
method: 'DELETE'
|
method: 'DELETE'
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user