mirror of
https://github.com/elastic/eland.git
synced 2025-07-11 00:02:14 +08:00
Merge pull request #53 from joshdevins/fix-field-caps-too-long
Fixes field caps query params exceeding HTTP limit
This commit is contained in:
commit
24f008af4e
@ -52,10 +52,9 @@ class Mappings:
|
|||||||
if (client is not None) and (index_pattern is not None):
|
if (client is not None) and (index_pattern is not None):
|
||||||
get_mapping = client.get_mapping(index=index_pattern)
|
get_mapping = client.get_mapping(index=index_pattern)
|
||||||
|
|
||||||
# Get all fields (including all nested) and then field_caps
|
# Get all fields (including all nested) and then all field_caps
|
||||||
# for these names (fields=* doesn't appear to work effectively...)
|
|
||||||
all_fields = Mappings._extract_fields_from_mapping(get_mapping)
|
all_fields = Mappings._extract_fields_from_mapping(get_mapping)
|
||||||
all_fields_caps = client.field_caps(index=index_pattern, fields=list(all_fields.keys()))
|
all_fields_caps = client.field_caps(index=index_pattern, fields='*')
|
||||||
|
|
||||||
# Get top level (not sub-field multifield) mappings
|
# Get top level (not sub-field multifield) mappings
|
||||||
source_fields = Mappings._extract_fields_from_mapping(get_mapping, source_only=True)
|
source_fields = Mappings._extract_fields_from_mapping(get_mapping, source_only=True)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user