发表于 2018-8-10 07:27:53

ElasticSearch的API python调用

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)
页: [1]
查看完整版本: ElasticSearch的API python调用