Skip to content

Commit

Permalink
Update es_pandas.py
Browse files Browse the repository at this point in the history
  • Loading branch information
fuyb1992 authored Dec 26, 2019
1 parent 9f8ff6c commit 8312be1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion es_pandas/es_pandas.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ def to_pandas(self, index, query_rule={'query': {'match_all': {}}}, heads=[], dt
# Fix es client unrecongnized parameter 'include_type_name' bug for es 6.x
mapping = self.ic.get_mapping(index=index)
key = [k for k in mapping[index]['mappings'].keys() if k != '_default_']
if len(keys) < 1: raise Exception('No templates exits: %s' % index)
if len(key) < 1: raise Exception('No templates exits: %s' % index)
mapping[index]['mappings']['properties'] = mapping[index]['mappings'][key[0]]['properties']
if len(heads) < 1:
heads = [k for k in mapping[index]['mappings']['properties'].keys()]
Expand Down

0 comments on commit 8312be1

Please sign in to comment.