def delete(self, index, doc_type, id, bulk=False, **query_params):
if bulk:<EOL><INDENT>cmd = {"<STR_LIT>": {"<STR_LIT>": index, "<STR_LIT>": doc_type,<EOL>"<STR_LIT>": id}}<EOL>self.bulker.add(json.dumps(cmd, cls=self.encoder))<EOL>return self.flush_bulk()<EOL><DEDENT>path = make_path(index, doc_type, id)<EOL>return self._send_request('<STR_LIT>', path, params=query_params)<EOL>
Delete a typed JSON document from a specific index based on its id.
If bulk is True, the delete operation is put in bulk mode.