Browse Source

perf: Improve performance by optimizing ES index creation

pull/13988/head
wangruidong 3 months ago committed by Bryan
parent
commit
32ec48ac14
  1. 3
      apps/common/plugins/es.py

3
apps/common/plugins/es.py

@ -190,7 +190,8 @@ class ES(object):
mappings['aliases'] = {
self.query_index: {}
}
if self.es.indices.exists(index=self.index):
return
try:
self.es.indices.create(index=self.index, body=mappings)
except (RequestError, BadRequestError) as e:

Loading…
Cancel
Save