Skip to content

Commit

Permalink
Merge pull request #1282 from hinashi/fixed/update_index_exception
Browse files Browse the repository at this point in the history
Added workaround for over key size case
  • Loading branch information
userlocalhost authored Sep 26, 2024
2 parents 968cd9d + 739c08a commit 849f3d4
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion entry/services.py
Original file line number Diff line number Diff line change
Expand Up @@ -314,7 +314,10 @@ def update_documents(kls, entity: Entity, is_update: bool = False):
indexes.append(
AdvancedSearchAttributeIndex.create_instance(entry, entity_attr, attrv)
)
AdvancedSearchAttributeIndex.objects.bulk_create(indexes)
try:
AdvancedSearchAttributeIndex.objects.bulk_create(indexes)
except Exception as e:
Logger.warning("Failed to create AdvancedSearchAttributeIndex: %s" % e)

@classmethod
def search_entries_v2(
Expand Down

0 comments on commit 849f3d4

Please sign in to comment.