es_head ()

阅读(2115) 标签: 执行head, 序表,

描述:

执行head指令,返回序表。

语法:

es_head(fd, endpoint)

备注:

外部库函数,外部库的使用请参考《外部库使用指南》。

检查一个文档/记录是否存在。 如果文档/记录存在,response值为:200 OK;如果文档/记录不存在,response值为:404 Not Found

参数:

fd

restclient对象。

endpoint

要检查的文档/记录的地址。

返回值:

序表

示例:

 

A

 

1

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

连接ES server

2

=es_head(A1,"/accounts/person/1")

查询indexaccountstypeaccountsid1的记录是否存在。