-
Notifications
You must be signed in to change notification settings - Fork 7
/
ElasticsearchClient.py
172 lines (162 loc) · 7.76 KB
/
ElasticsearchClient.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
import os
import sys
from imp import reload
package_path = os.path.dirname(__file__)
libpath = os.path.join(package_path, "lib")
if libpath not in sys.path:
sys.path.append(libpath)
def reload_modeule(module):
print("reloading plugin {}".format(module))
reload(sys.modules[module])
module_load_order = [
"dateutil",
"requests",
"six",
"urllib3",
"analytics",
"elasticsearch",
"elasticsearch_connections",
"ElasticsearchClient.panel.warmer_list_panel",
"ElasticsearchClient.panel.switch_server_list_panel",
"ElasticsearchClient.panel.snapshot_list_panel",
"ElasticsearchClient.panel.search_template_list_panel",
"ElasticsearchClient.panel.script_list_panel",
"ElasticsearchClient.panel.repository_list_panel",
"ElasticsearchClient.panel.index_template_list_panel",
"ElasticsearchClient.panel.index_list_panel",
"ElasticsearchClient.panel.field_list_panel",
"ElasticsearchClient.panel.doc_type_list_panel",
"ElasticsearchClient.panel.analyzer_list_panel",
"ElasticsearchClient.panel.alias_list_panel",
"ElasticsearchClient.panel",
"ElasticsearchClient.commands.base",
"ElasticsearchClient.commands.bulk",
"ElasticsearchClient.commands.cat_aliases",
"ElasticsearchClient.commands.cat_allocation",
"ElasticsearchClient.commands.cat_count",
"ElasticsearchClient.commands.cat_fielddata",
"ElasticsearchClient.commands.cat_health",
"ElasticsearchClient.commands.cat_indices",
"ElasticsearchClient.commands.cat_master",
"ElasticsearchClient.commands.cat_nodes",
"ElasticsearchClient.commands.cat_pending_tasks",
"ElasticsearchClient.commands.cat_plugins",
"ElasticsearchClient.commands.cat_recovery",
"ElasticsearchClient.commands.cat_segments",
"ElasticsearchClient.commands.cat_shards",
"ElasticsearchClient.commands.cat_thread_pool",
"ElasticsearchClient.commands.clear_scroll",
"ElasticsearchClient.commands.cluster_get_settings",
"ElasticsearchClient.commands.cluster_health",
"ElasticsearchClient.commands.cluster_pending_tasks",
"ElasticsearchClient.commands.cluster_put_settings",
"ElasticsearchClient.commands.cluster_reroute",
"ElasticsearchClient.commands.cluster_state",
"ElasticsearchClient.commands.cluster_stats",
"ElasticsearchClient.commands.count",
"ElasticsearchClient.commands.count_percolate",
"ElasticsearchClient.commands.create_document",
"ElasticsearchClient.commands.delete_by_query",
"ElasticsearchClient.commands.delete_document",
"ElasticsearchClient.commands.delete_script",
"ElasticsearchClient.commands.delete_search_template",
"ElasticsearchClient.commands.exists_document",
"ElasticsearchClient.commands.explain_document",
"ElasticsearchClient.commands.field_stats",
"ElasticsearchClient.commands.get_document",
"ElasticsearchClient.commands.get_document_source",
"ElasticsearchClient.commands.get_multiple_documents",
"ElasticsearchClient.commands.get_percolator_query",
"ElasticsearchClient.commands.get_script",
"ElasticsearchClient.commands.get_search_template",
"ElasticsearchClient.commands.helper_benchmark",
"ElasticsearchClient.commands.helper_change_number_of_replicas",
"ElasticsearchClient.commands.helper_close_open_index",
"ElasticsearchClient.commands.helper_convert_csv_bulk_index",
"ElasticsearchClient.commands.helper_dump_index_data",
"ElasticsearchClient.commands.helper_import_csv",
"ElasticsearchClient.commands.helper_load_index_data",
"ElasticsearchClient.commands.helper_reindex",
"ElasticsearchClient.commands.index_document",
"ElasticsearchClient.commands.index_percolator_query",
"ElasticsearchClient.commands.indices_analyze",
"ElasticsearchClient.commands.indices_clear_cache",
"ElasticsearchClient.commands.indices_close",
"ElasticsearchClient.commands.indices_create",
"ElasticsearchClient.commands.indices_create_doc_type",
"ElasticsearchClient.commands.indices_delete",
"ElasticsearchClient.commands.indices_delete_alias",
"ElasticsearchClient.commands.indices_delete_mapping",
"ElasticsearchClient.commands.indices_delete_template",
"ElasticsearchClient.commands.indices_delete_warmer",
"ElasticsearchClient.commands.indices_exists",
"ElasticsearchClient.commands.indices_exists_alias",
"ElasticsearchClient.commands.indices_exists_doc_type",
"ElasticsearchClient.commands.indices_exists_template",
"ElasticsearchClient.commands.indices_flush",
"ElasticsearchClient.commands.indices_flush_synced",
"ElasticsearchClient.commands.indices_get",
"ElasticsearchClient.commands.indices_get_alias",
"ElasticsearchClient.commands.indices_get_field_mapping",
"ElasticsearchClient.commands.indices_get_mapping",
"ElasticsearchClient.commands.indices_get_settings",
"ElasticsearchClient.commands.indices_get_template",
"ElasticsearchClient.commands.indices_get_upgrade",
"ElasticsearchClient.commands.indices_get_warmer",
"ElasticsearchClient.commands.indices_open",
"ElasticsearchClient.commands.indices_optimize",
"ElasticsearchClient.commands.indices_put_alias",
"ElasticsearchClient.commands.indices_put_mapping",
"ElasticsearchClient.commands.indices_put_settings",
"ElasticsearchClient.commands.indices_put_template",
"ElasticsearchClient.commands.indices_put_warmer",
"ElasticsearchClient.commands.indices_recovery",
"ElasticsearchClient.commands.indices_refresh",
"ElasticsearchClient.commands.indices_segments",
"ElasticsearchClient.commands.indices_stats",
"ElasticsearchClient.commands.indices_status",
"ElasticsearchClient.commands.indices_update_aliases",
"ElasticsearchClient.commands.indices_upgrade",
"ElasticsearchClient.commands.indices_validate_query",
"ElasticsearchClient.commands.info",
"ElasticsearchClient.commands.multiple_percolate",
"ElasticsearchClient.commands.multiple_search",
"ElasticsearchClient.commands.multiple_termvectors",
"ElasticsearchClient.commands.nodes_hot_threads",
"ElasticsearchClient.commands.nodes_info",
"ElasticsearchClient.commands.nodes_shutdown",
"ElasticsearchClient.commands.percolate",
"ElasticsearchClient.commands.ping",
"ElasticsearchClient.commands.put_script",
"ElasticsearchClient.commands.put_search_template",
"ElasticsearchClient.commands.scroll",
"ElasticsearchClient.commands.search_exists",
"ElasticsearchClient.commands.search_percolator_query",
"ElasticsearchClient.commands.search_request_body",
"ElasticsearchClient.commands.search_shards",
"ElasticsearchClient.commands.search_simple_query",
"ElasticsearchClient.commands.search_template",
"ElasticsearchClient.commands.settings_select_doc_type",
"ElasticsearchClient.commands.settings_select_index",
"ElasticsearchClient.commands.settings_show_active_server",
"ElasticsearchClient.commands.settings_switch_server",
"ElasticsearchClient.commands.show_output_panel",
"ElasticsearchClient.commands.show_response",
"ElasticsearchClient.commands.snapshot_create",
"ElasticsearchClient.commands.snapshot_create_repository",
"ElasticsearchClient.commands.snapshot_delete",
"ElasticsearchClient.commands.snapshot_delete_repository",
"ElasticsearchClient.commands.snapshot_get",
"ElasticsearchClient.commands.snapshot_get_repository",
"ElasticsearchClient.commands.snapshot_restore",
"ElasticsearchClient.commands.snapshot_status",
"ElasticsearchClient.commands.snapshot_verify_repository",
"ElasticsearchClient.commands.suggest",
"ElasticsearchClient.commands.termvector",
"ElasticsearchClient.commands.update_document",
"ElasticsearchClient.commands",
]
for module in module_load_order:
if module in sys.modules:
reload_modeule(module)
from .commands import *