Elasticsearch x Python - 엘리스틱 서치 연동
Elasticsearch가 설치되어 있는 환경에서, Python으로 간단한 질의를 해 본 스크립트이다. #!/usr/bin/env python # -*- coding: utf-8 -*- import json from elasticsearch import Elasticsearch host = '150.19.5.30' port = '9200' target = 'http://{}:{}'.format(host,port) #print(target) es = Elasticsearch( [{'host':host, 'port':port}]) docs = es.search(index='skt_app_vdi_file-20171123', filter_path=['hits.hits._*']) #len(docs['hits'][..
개발 이야기
2020. 3. 10. 02:58