Skip to content

Commit 7c0d21e

Browse files
committed
fix(test): add ignore_unavailable=True to Elasticsearch refresh calls
Updated the index refresh logic in both the example usage notebook and the integration tests to include `ignore_unavailable=True`.
1 parent 667e889 commit 7c0d21e

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

notebooks/example_usage.ipynb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@
9090
"\n",
9191
"# --- FIX: Force a refresh on the indices to make new documents searchable ---\n",
9292
"print(\"Refreshing indices...\")\n",
93-
"cs.elastic.indices.refresh(index=indices)\n",
93+
"cs.elastic.indices.refresh(index=indices, ignore_unavailable=True)\n",
9494
"print(\"✅ Indices refreshed.\")\n",
9595
"\n",
9696
"\n",

pat2vec/tests/test_integration_elastic.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ def test_populate_and_search(self):
7171
self.assertIsNotNone(client)
7272

7373
# Force refresh to make documents visible to search
74-
client.elastic.indices.refresh(index="epr_documents")
74+
client.elastic.indices.refresh(index="epr_documents", ignore_unavailable=True)
7575

7676
# Verify data exists in one of the core indices
7777
res = client.elastic.count(index="epr_documents")

0 commit comments

Comments
 (0)