{"action":"created","issue":{"url":"https://api.github.com/repos/drakerian/loopback-connector-elastic-search/issues/11","repository_url":"https://api.github.com/repos/drakerian/loopback-connector-elastic-search","labels_url":"https://api.github.com/repos/drakerian/loopback-connector-elastic-search/issues/11/labels{/name}","comments_url":"https://api.github.com/repos/drakerian/loopback-connector-elastic-search/issues/11/comments","events_url":"https://api.github.com/repos/drakerian/loopback-connector-elastic-search/issues/11/events","html_url":"https://github.com/drakerian/loopback-connector-elastic-search/issues/11","id":150902500,"number":11,"title":"Bad request about DELETE","user":{"login":"colundrum","id":5010785,"avatar_url":"https://avatars.githubusercontent.com/u/5010785?v=3","gravatar_id":"","url":"https://api.github.com/users/colundrum","html_url":"https://github.com/colundrum","followers_url":"https://api.github.com/users/colundrum/followers","following_url":"https://api.github.com/users/colundrum/following{/other_user}","gists_url":"https://api.github.com/users/colundrum/gists{/gist_id}","starred_url":"https://api.github.com/users/colundrum/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/colundrum/subscriptions","organizations_url":"https://api.github.com/users/colundrum/orgs","repos_url":"https://api.github.com/users/colundrum/repos","events_url":"https://api.github.com/users/colundrum/events{/privacy}","received_events_url":"https://api.github.com/users/colundrum/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2016-04-25T15:38:26Z","updated_at":"2016-04-30T00:42:20Z","closed_at":null,"body":"Hi,\r\n\r\nWhen I do a delete using explorer, the curl request is :\r\n\r\n`curl -X DELETE --header \"Accept: application/json\" \"https://domain.com/api/items/AVRN9YTgQpzsefUO2miC\"`\r\n\r\nThis fail with :\r\n\r\n```\r\n{\r\n  \"error\": {\r\n    \"name\": \"TypeError\",\r\n    \"status\": 500,\r\n    \"message\": \"self.db.deleteByQuery is not a function\",\r\n    \"stack\": \"TypeError: self.db.deleteByQuery is not a function\\n    at destroyAll (/opt/development/node_modules/loopback-connector-es/lib/esConnector.js:796:13)\\n    at doDelete (/opt/development/node_modules/loopback-datasource-juggler/lib/dao.js:1740:19)\\n    at /opt/development/node_modules/loopback-datasource-juggler/lib/dao.js:1714:11\\n    at doNotify (/opt/development/node_modules/loopback-datasource-juggler/lib/observer.js:93:49)\\n    at doNotify (/opt/development/node_modules/loopback-datasource-juggler/lib/observer.js:93:49)\\n    at doNotify (/opt/development/node_modules/loopback-datasource-juggler/lib/observer.js:93:49)\\n    at doNotify (/opt/development/node_modules/loopback-datasource-juggler/lib/observer.js:93:49)\\n    at Function.ObserverMixin._notifyBaseObservers (/opt/development/node_modules/loopback-datasource-juggler/lib/observer.js:116:5)\\n    at Function.ObserverMixin.notifyObserversOf (/opt/development/node_modules/loopback-datasource-juggler/lib/observer.js:91:8)\\n    at Function.ObserverMixin._notifyBaseObservers (/opt/development/node_modules/loopback-datasource-juggler/lib/observer.js:114:15)\\n    at Function.ObserverMixin.notifyObserversOf (/opt/development/node_modules/loopback-datasource-juggler/lib/observer.js:91:8)\\n    at Function.ObserverMixin._notifyBaseObservers (/opt/development/node_modules/loopback-datasource-juggler/lib/observer.js:114:15)\\n    at Function.ObserverMixin.notifyObserversOf (/opt/development/node_modules/loopback-datasource-juggler/lib/observer.js:91:8)\\n    at Function.ObserverMixin._notifyBaseObservers (/opt/development/node_modules/loopback-datasource-juggler/lib/observer.js:114:15)\\n    at Function.ObserverMixin.notifyObserversOf (/opt/development/node_modules/loopback-datasource-juggler/lib/observer.js:91:8)\\n    at /opt/development/node_modules/loopback-datasource-juggler/lib/dao.js:1712:15\"\r\n  }\r\n}\r\n```\r\n\r\nBut if I execute the right request directly to elasticsearch, it's ok and this is the request :\r\n\r\n`curl -XDELETE 'http://localhost:9200/items/item/AVRN9YTgQpzsefUO2miC'`\r\n\r\nReference : [Delete API](https://www.elastic.co/guide/en/elasticsearch/reference/2.2/docs-delete.html)\r\n\r\nThanks"},"comment":{"url":"https://api.github.com/repos/drakerian/loopback-connector-elastic-search/issues/comments/215916176","html_url":"https://github.com/drakerian/loopback-connector-elastic-search/issues/11#issuecomment-215916176","issue_url":"https://api.github.com/repos/drakerian/loopback-connector-elastic-search/issues/11","id":215916176,"user":{"login":"pulkitsinghal","id":821963,"avatar_url":"https://avatars.githubusercontent.com/u/821963?v=3","gravatar_id":"","url":"https://api.github.com/users/pulkitsinghal","html_url":"https://github.com/pulkitsinghal","followers_url":"https://api.github.com/users/pulkitsinghal/followers","following_url":"https://api.github.com/users/pulkitsinghal/following{/other_user}","gists_url":"https://api.github.com/users/pulkitsinghal/gists{/gist_id}","starred_url":"https://api.github.com/users/pulkitsinghal/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pulkitsinghal/subscriptions","organizations_url":"https://api.github.com/users/pulkitsinghal/orgs","repos_url":"https://api.github.com/users/pulkitsinghal/repos","events_url":"https://api.github.com/users/pulkitsinghal/events{/privacy}","received_events_url":"https://api.github.com/users/pulkitsinghal/received_events","type":"User","site_admin":false},"created_at":"2016-04-30T00:42:20Z","updated_at":"2016-04-30T00:42:20Z","body":"@colundrum - try this fork/repo instead:\r\nhttps://github.com/strongloop-community/loopback-connector-elastic-search\r\n\r\nAnd join the community discussions at: \r\nhttps://gitter.im/strongloop-community/loopback-connector-elastic-search"}}