Skip to content

Commit

Permalink
Index alias support for adjusting comments (#23)
Browse files Browse the repository at this point in the history
  • Loading branch information
Zawadidone authored Jul 9, 2024
1 parent 923c06d commit 1954d86
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions timesketch/api/v1/resources/event.py
Original file line number Diff line number Diff line change
Expand Up @@ -813,6 +813,7 @@ def post(self, sketch_id):

for _event in events:
searchindex_id = _event["_index"]

# In case the index is part of an alias index, the alias name is used as searchindex
searchindex_id, searchindex_name = self.datastore.resolve_index_alias(
searchindex_id
Expand Down Expand Up @@ -931,6 +932,9 @@ def put(self, sketch_id):
# only one event will be in the event list
for _event in events:
searchindex_id = _event["_index"]

# In case the index is part of an alias index, the alias name is used as searchindex
searchindex_id, _ = self.datastore.resolve_index_alias(searchindex_id)
searchindex = SearchIndex.query.filter_by(index_name=searchindex_id).first()
event_id = _event["_id"]

Expand Down

0 comments on commit 1954d86

Please sign in to comment.