Skip to content

Improve IndexCommand output: resolved uids, summary, honest --delete warning#163

Open
loevgaard wants to merge 1 commit into
issue-129-search-route-disabledfrom
issue-131-index-command-output
Open

Improve IndexCommand output: resolved uids, summary, honest --delete warning#163
loevgaard wants to merge 1 commit into
issue-129-search-route-disabledfrom
issue-131-index-command-output

Conversation

@loevgaard

Copy link
Copy Markdown
Member

What

setono:sylius-meilisearch:index printed only Index "%s" submitted for indexing. Now:

  • Resolved uids up front. Each index prints the concrete Meilisearch uids it will write, across all scopes: Indexing products → products__fashion_web__en_us__usd, …. In the default (synchronous) setup this also makes clear the command is doing real work, not hanging.
  • Honest --delete warning. Reworded to state the consequence explicitly: the live index is deleted first, so search returns no results for that index until reindexing completes; a plain reindex (without --delete) upserts in place and avoids the downtime.
  • Summary after --wait. Once the Meilisearch tasks have finished (which is why it's printed after --wait), a table of document count per resolved uid is shown.

The per-batch mapped/filtered/invalid/indexed counts are emitted to the dedicated log channel by the indexer (#128) — those can't be aggregated back into the command process for an async run, so the command's summary reports the resulting document counts instead.

Testing

  • IndexCommandTest::it_prints_the_resolved_uids_and_an_honest_delete_warning (via CommandTester): output names each resolved uid and the --delete warning explains the downtime.
  • The existing createTasksQuery tests still pass.

Closes #131


Stacked on #162 (#129).

@codecov

codecov Bot commented Jul 10, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 44.44444% with 15 lines in your changes missing coverage. Please review.
✅ Project coverage is 48.55%. Comparing base (3b74c19) to head (f569bbb).

Files with missing lines Patch % Lines
src/Command/IndexCommand.php 44.44% 15 Missing ⚠️
Additional details and impacted files
@@                          Coverage Diff                          @@
##             issue-129-search-route-disabled     #163      +/-   ##
=====================================================================
+ Coverage                              47.14%   48.55%   +1.40%     
- Complexity                               777      781       +4     
=====================================================================
  Files                                    139      139              
  Lines                                   2503     2521      +18     
=====================================================================
+ Hits                                    1180     1224      +44     
+ Misses                                  1323     1297      -26     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@loevgaard loevgaard force-pushed the issue-129-search-route-disabled branch from 2f5f495 to 66d13e3 Compare July 10, 2026 17:16
@loevgaard loevgaard force-pushed the issue-131-index-command-output branch from 8ce7ef7 to 12dcb37 Compare July 10, 2026 17:16
@loevgaard loevgaard force-pushed the issue-129-search-route-disabled branch from 66d13e3 to bb00e15 Compare July 10, 2026 17:20
@loevgaard loevgaard force-pushed the issue-131-index-command-output branch from 12dcb37 to aba7b03 Compare July 10, 2026 17:20
@loevgaard loevgaard force-pushed the issue-129-search-route-disabled branch from bb00e15 to a110a78 Compare July 10, 2026 18:11
@loevgaard loevgaard force-pushed the issue-131-index-command-output branch from aba7b03 to 52cfbb7 Compare July 10, 2026 18:11
…warning

- Print the resolved index uids per index up front (Indexing products →
  products__fashion_web__en_us__usd, …) so the operator can see exactly
  which Meilisearch indexes are being written.
- Reword the --delete warning to state the consequence explicitly: the live
  index is deleted first, so search returns no results for that index until
  reindexing completes; a plain reindex upserts in place.
- After --wait (when the Meilisearch tasks have finished), print a summary
  table of document count per resolved uid. The per-batch mapped/filtered/
  invalid/indexed counts are emitted to the log by the indexer (#128).

Closes #131
@loevgaard loevgaard force-pushed the issue-131-index-command-output branch from 52cfbb7 to f569bbb Compare July 13, 2026 16:32
@loevgaard loevgaard force-pushed the issue-129-search-route-disabled branch from a110a78 to 3b74c19 Compare July 13, 2026 16:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant