Skip to content

Commit

Permalink
Fix shallow copy issue when splitting long index records
Browse files Browse the repository at this point in the history
Fixes #149
  • Loading branch information
ashtum committed Nov 29, 2024
1 parent 1284cee commit 87b0336
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion gecko/index_on_algolia.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
# Split long documents into smaller parts.
for record in records:
if len(record['content']) > 5000:
new_record = record
new_record = record.copy()
new_record['content'] = new_record['content'][4900:]
record['content'] = record['content'][:5000]
records.append(new_record)
Expand Down

0 comments on commit 87b0336

Please sign in to comment.