Skip to content

Commit

Permalink
Fix typo which causes error for document with more than 1000 sections. (
Browse files Browse the repository at this point in the history
  • Loading branch information
anatolip authored Mar 22, 2023
1 parent e201432 commit 1273a21
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion scripts/prepdocs.py
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ def index_sections(filename, sections):
batch.append(s)
i += 1
if i % 1000 == 0:
results = search_client.index_documents(batch=batch)
results = search_client.upload_documents(documents=batch)
succeeded = sum([1 for r in results if r.succeeded])
if args.verbose: print(f"\tIndexed {len(results)} sections, {succeeded} succeeded")
batch = []
Expand Down

0 comments on commit 1273a21

Please sign in to comment.