Hello, I need you help,
My data looks like this (My json files)
{"index": {"_id":2530}}
{"visitor_id": "4395667", "timestamp": "2020-08-07T10:24:00Z", "station_id": "Place A"}
{"index": {"_id":2531}}
{"visitor_id": "4395668", "timestamp": "2020-08-07T11:09:55Z", "station_id": "Réaumur"}
I use curl command to injected in Elasticsearch
curl -s -H "Content-Type:application/json" -XPOST http://localhost:9200/gpsdata/log/_bulk?pretty --data-binary "@%%f"
I am working with Python Elastic search to do some queries on my data, for example :
es = Elasticsearch('http://localhost:9200')
search_param={
"size": 0,
"aggs" : {
"langs" : {
"terms" : { "field" : "station_id.keyword"}
}
}}
response = es.search(index="gpsdata", body=search_param)
response['aggregations']
The result I get in after running python code is :
{'langs': {'doc_count_error_upper_bound': 0,
'sum_other_doc_count': 0,
'buckets': [{'key': 'Dor', 'doc_count': 639},
{'key': 'Réaumur', 'doc_count': 92},
{'key': 'PlaceA', 'doc_count': 61},
{'key': 'Curé Crampette', 'doc_count': 33},
{'key': 'Le Prieuré', 'doc_count': 17},
The words with accent like "Réaumur" are not displayed well, Thanks in advance.