es_delete()

Read(301) Label: execute delete, boolean value,

Description:

  Execute the delete command and return a boolean value.

Syntax:

   es_delete(fd, endpoint, entityheader)

Note:

  The function executes the delete command and returns true if the deletion action is successful or false if the deletion fails.

Parameters:

fd

A REST Client object

endpoint

Rest API address

entity

A parameter transmitted through http body, which is a JSON string or a block of data in JSON format

header

A variable parameter that passes http header; it is a key type JSON string

Return value

Boolean value

Example:

 

A

 

1

=es_open("localhost:9200","user":"un1234")

Connect to ES server

2

=es_delete(A1,"/accounts/person","user:jacker")

Delete the record where user is jacker under the level where index is accounts and type is person

3

=es_delete(A1,"/student")

Delete the index file where the index is student