regenerate api docs

This commit is contained in:
Spencer Alger
2015-06-05 13:56:01 -07:00
parent d56578b774
commit eebd7d117b
8 changed files with 104 additions and 64 deletions

View File

@ -952,8 +952,8 @@ The default method is `POST` and the usual <<api-conventions,params and return v
[source,js]
---------
client.index({
index: '_percolator',
type: 'myindex',
index: 'myindex',
type: '.percolator',
id: 'alert-1',
body: {
// This query will be run against documents sent to percolate
@ -968,8 +968,8 @@ client.index({
});
client.index({
index: '_percolator',
type: 'myindex',
index: 'myindex',
type: '.percolator',
id: 'alert-2',
body: {
// This query will also be run against documents sent to percolate
@ -989,6 +989,7 @@ client.index({
---------
client.percolate({
index: 'myindex',
type: 'mytype',
body: {
doc: {
title: "Foo"
@ -997,13 +998,14 @@ client.percolate({
}, function (error, response) {
// response would equal
// {
// ok:true,
// matches: [ "alert-1" ]
// total: 1,
// matches: [ { _index: 'myindex', _id: 'alert-1' } ]
// }
});
client.percolate({
index: 'myindex',
type: 'mytype',
body: {
doc: {
title: "Foo Bar"
@ -1012,8 +1014,11 @@ client.percolate({
}, function (error, response) {
// response would equal
// {
// ok:true,
// matches: [ "alert-1", "alert-2" ]
// total: 2,
// matches: [
// { _index: 'myindex', _id: 'alert-1' },
// { _index: 'myindex', _id: 'alert-2' }
// ]
// }
});
---------