Updated docs

This commit is contained in:
delvedor
2019-02-19 09:34:23 +01:00
parent a8f861c4d4
commit 8fd0d49a03

View File

@ -3,7 +3,7 @@
Sometimes you need to reuse the same logic, or you want to build a custom API to allow you simplify your code. +
The easiest way to achieve that is by extending the client.
NOTE: You can't override existing methods.
NOTE: If you want to override existing methods, you should specify the `{ force: true }` option.
[source,js]
----
@ -57,6 +57,12 @@ client.extend('utility.delete', ({ makeRequest }) => {
}
})
client.extend('indices.delete', { force: true }, ({ makeRequest }) => {
return function _delete (params, options) {
// your code
}
})
client.supersearch(...)
client.utility.index(...)
client.utility.delete(...)