Skip to content

Commit

Permalink
add: meilisearch
Browse files Browse the repository at this point in the history
  • Loading branch information
MagicTheDev committed Apr 3, 2024
1 parent dae5fcd commit 3187616
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 12 deletions.
22 changes: 12 additions & 10 deletions .idea/workspace.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 8 additions & 2 deletions gamewide/search/track.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,5 +39,11 @@ async def main():

# An index is where the documents are stored.
index = client.index('players')
await index.add_documents_in_batches(documents=docs_to_insert, batch_size=100_000, primary_key="id", compress=True)
await asyncio.sleep(15)
finished = False
while not finished:
try:
await index.add_documents_in_batches(documents=docs_to_insert, batch_size=5000, primary_key="id", compress=True)
finished = True
except Exception:
logger.info("trying to add again")
pass

0 comments on commit 3187616

Please sign in to comment.