Skip to content

Commit

Permalink
moderation: allow updating the percolator indices
Browse files Browse the repository at this point in the history
  • Loading branch information
slint committed Dec 13, 2024
1 parent 07eda90 commit d515bc8
Showing 1 changed file with 14 additions and 2 deletions.
16 changes: 14 additions & 2 deletions site/zenodo_rdm/moderation/percolator.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,20 @@ def create_percolator_index(record_cls):
"mappings": {**percolator_mappings},
},
)
except Exception as e:
current_app.logger.exception(e)
except Exception:
current_app.logger.exception(
"Failed to create moderation percolator index."
)
else:
try:
current_search_client.indices.put_mapping(
index=percolator_index,
body=percolator_mappings,
)
except Exception:
current_app.logger.exception(
"Failed to update moderation percolator index."
)


def index_percolate_query(
Expand Down

0 comments on commit d515bc8

Please sign in to comment.