Skip to content

Commit b0849d0

Browse files
author
Sean Sullivan
committed
Cross cluster queries for mappings doesn't work use local index
1 parent 32f4c93 commit b0849d0

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

elastic_datashader/elastic.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -167,6 +167,8 @@ def get_field_type(elastic_hosts: str, headers: Optional[str], params: Dict[str,
167167
timeout=900,
168168
headers=get_es_headers(headers, user, x_opaque_id),
169169
)
170+
if idx.find("*:") != -1:
171+
idx = idx[idx.find("*:")+2:] #when you query for mappings if it is cross cluster you don't get a mapping
170172
mappings = es.indices.get_field_mapping(fields=field, index=idx)
171173
# {'foot_prints': {'mappings': {'foot_print': {'full_name': 'foot_print', 'mapping': {'foot_print': {'type': 'geo_shape'}}}}}}
172174
index = list(mappings.keys())[0] # if index is my_index* it comes back as my_index

0 commit comments

Comments
 (0)