Skip to content

Commit 4229a5d

Browse files
committed
fix: force Solr commit after apachesolr indexing to ensure docs are searchable
1 parent defd4ef commit 4229a5d

1 file changed

Lines changed: 9 additions & 1 deletion

File tree

.github/scripts/solr9-cuj7-create-index.sh

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,15 @@ if [ "$MODULE" = "apachesolr" ]; then
3030
step "Step 2: Index content"
3131
terminus drush "$SITE_ENV" -- solr-index
3232

33-
step "Step 3: Verify index count"
33+
step "Step 3: Commit index and verify count"
34+
# Force Solr commit to ensure docs are searchable before CUJ 8
35+
drush_ev "
36+
\$env_id = apachesolr_default_environment();
37+
\$solr = apachesolr_get_solr(\$env_id);
38+
\$solr->commit();
39+
" || true
40+
sleep 5
41+
3442
INDEX_STATS=$(drush_ev "
3543
\$env_id = apachesolr_default_environment();
3644
try {

0 commit comments

Comments
 (0)