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

@ -1113,8 +1113,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
@ -1129,8 +1129,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
@ -1150,6 +1150,7 @@ client.index({
---------
client.percolate({
index: 'myindex',
type: 'mytype',
body: {
doc: {
title: "Foo"
@ -1158,13 +1159,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"
@ -1173,8 +1175,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' }
// ]
// }
});
---------