def getKibiRelationConfig(indexName=".kibi", typeName="config" , elasticPort=9220, elasticHost="localhost"):
es = Elasticsearch([{'host': elasticHost, 'port': elasticPort}], http_auth=(elasticUsername, elasticPassword))
mapping = es.search(
index=indexName,
doc_type=typeName,
size=1000,
request_timeout=1060,
body={
'query': {
'filtered': {
'query': {
'match_all': {}
}
}
}
}
)
return mapping['hits']['hits'][0]
#return mapping[SourceIndexName]["mappings"][SourceTypeName]
knowledgeGraphCreator.py 文件源码
python
阅读 17
收藏 0
点赞 0
评论 0
评论列表
文章目录