码迷,mamicode.com
首页 > 编程语言 > 详细

ElasticSearch的API python调用

时间:2017-11-08 10:32:59      阅读:189      评论:0      收藏:0      [点我收藏+]

标签:elasticsearch api

os
json
datetime datetime
django.http HttpResponse
re

elasticsearch Elasticsearch

es = Elasticsearch(
    []=)

res8 = es.search(
    ==={
        :{
                :{
                    :{
                        ::}
                }
        }

    }
)
statistic():
    ():
        hit res8[][]:
            a=  (%hit + %hit[])
            a= re.split(a);
            a
            row a:
                id = row[]
                = row[]
                id
            HttpResponse(a)


ElasticSearch的API python调用

标签:elasticsearch api

原文地址:http://2924177.blog.51cto.com/2914177/1979799

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!