Repository navigation
feat: add --set option to app:meilisearch:index - #78
Merged
Merged
Conversation
Allows re-indexing only the cards of given sets (e.g. after app:fix:missing-card-set) instead of streaming all 5.4M cards in a single GROUP BY query, which fills Postgres temp space on prod. - CardDocumentRepository::streamDocuments() accepts set references - new CardDocumentRepository::countBySetReferences() - --set is rejected with --clear (would wipe other sets) and --fields - exit cleanly when no cards match (progress bar crashed on max=0) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Contexte
Après
app:fix:missing-card-set(89 cartes rattachées à EOLECB / EOLEOP / EOLETOP), il faut réindexer ces cartes dans Meilisearch pour que le filtreset_referenceles remonte. L'index complet échoue en prod : la requête unique sur 5,4 M de cartes (GROUP BY sur ~20 jointures) remplitpgsql_tmp→SQLSTATE[53100]: Disk full.Changements
app:meilisearch:index --set=EOLECB,EOLEOP,EOLETOP: ne streame et n'upserte que les cartes de ces setsCardDocumentRepository::streamDocuments()accepte une liste de références de set (WHERE cs.reference IN (...))CardDocumentRepository::countBySetReferences()pour la barre de progression--setrefusé avec--clear(effacerait tous les autres sets) et avec--fields— vérifié avant toute actionmax = 0)Tests
tests/Unit/Repository/CardDocumentRepositoryTest.php: SQL et paramètres du filtre par set, absence de filtre par défaut, counttests/Unit/Command/MeilisearchIndexCommandTest.php: garde-fous--clear/--fields, parsing de--set, set inconnuphp bin/phpunit --testsuite Unit→ OK (26 tests). Non testé contre une vraie base Postgres / Meilisearch.Après déploiement
🤖 Generated with Claude Code