Revert "Update api_methods.asciidoc"

This reverts commit 09aab06698.
This commit is contained in:
Andreas Zoellner
2015-06-04 17:32:04 -07:00
parent 09aab06698
commit 0daa7d48b1

View File

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