Skip to content

Commit

Permalink
Permit single-journal reindexing
Browse files Browse the repository at this point in the history
  • Loading branch information
asmecher committed Apr 30, 2024
1 parent 71a406e commit a008e69
Show file tree
Hide file tree
Showing 57 changed files with 2 additions and 210 deletions.
10 changes: 2 additions & 8 deletions classes/search/ArticleSearchIndex.php
Original file line number Diff line number Diff line change
Expand Up @@ -293,26 +293,20 @@ public function rebuildIndex($log = false, $journal = null, $switches = [])
return;
}

// Check that no journal was given as we do
// not support journal-specific re-indexing.
if (is_a($journal, 'Journal')) {
exit(__('search.cli.rebuildIndex.indexingByJournalNotSupported') . "\n");
}

// Clear index
if ($log) {
echo __('search.cli.rebuildIndex.clearingIndex') . ' ... ';
}
$searchDao = DAORegistry::getDAO('ArticleSearchDAO'); /** @var ArticleSearchDAO $searchDao */
$searchDao->clearIndex();
$searchDao->clearIndex($journal ? $journal->getId() : null);
if ($log) {
echo __('search.cli.rebuildIndex.done') . "\n";
}

// Build index
$journalDao = DAORegistry::getDAO('JournalDAO'); /** @var JournalDAO $journalDao */

$journals = $journalDao->getAll()->toIterator();
$journals = $journal ? [$journal] : $journalDao->getAll()->toArray();
foreach ($journals as $journal) {
$numIndexed = 0;

Expand Down
3 changes: 0 additions & 3 deletions locale/ar/locale.po
Original file line number Diff line number Diff line change
Expand Up @@ -2320,9 +2320,6 @@ msgstr "<p>إلغاء الموافقة على هذا اللوح الطباعي.<
msgid "search.cli.rebuildIndex.indexing"
msgstr "فهرسة \"{$journalName}\""

msgid "search.cli.rebuildIndex.indexingByJournalNotSupported"
msgstr "تطبيق هذا البحث لا يسمح بإعادة الفهرسة على مستوى المجلة الواحدة."

msgid "search.cli.rebuildIndex.unknownJournal"
msgstr "إن مسار المجلة \"{$journalPath}\" تعذر الوصول منه إليها."

Expand Down
3 changes: 0 additions & 3 deletions locale/az/locale.po
Original file line number Diff line number Diff line change
Expand Up @@ -2375,9 +2375,6 @@ msgstr "Gözlənilən təsdiq."
msgid "article.view.interstitial"
msgstr "Zəhmət olmasa endirmək üçün bir məqalə faylı seçin."

msgid "search.cli.rebuildIndex.indexingByJournalNotSupported"
msgstr "Bu axtarış tətbiqi, jurnal başına təkrar indekslənməsinə icazə verməz."

msgid "search.cli.rebuildIndex.unknownJournal"
msgstr "Verilen gündəlik yolu \"{$journalPath}\" bu Jurnal üçün həll edilmədi."

Expand Down
5 changes: 0 additions & 5 deletions locale/bg/locale.po
Original file line number Diff line number Diff line change
Expand Up @@ -2458,11 +2458,6 @@ msgstr "<p>Премахване на одобрението на тази тип
msgid "search.cli.rebuildIndex.indexing"
msgstr "Индексиране на \"{$journalName}\""

msgid "search.cli.rebuildIndex.indexingByJournalNotSupported"
msgstr ""
"Тази реализация на търсене не позволява повторно индексиране за всяко "
"списание."

msgid "search.cli.rebuildIndex.unknownJournal"
msgstr ""
"Даденият път на списанието \"{$journalPath}\" не може да бъде разрешен или "
Expand Down
4 changes: 0 additions & 4 deletions locale/bs/locale.po
Original file line number Diff line number Diff line change
Expand Up @@ -2422,10 +2422,6 @@ msgstr "<p>Ukloni odobrenje ovog prijeloma.</p>"
msgid "search.cli.rebuildIndex.indexing"
msgstr "Indeksiranje \"{$journalName}\""

msgid "search.cli.rebuildIndex.indexingByJournalNotSupported"
msgstr ""
"Ova provedba pretraživanja ne dozvoljava ponovno indeksiranje po časopisu."

msgid "search.cli.rebuildIndex.unknownJournal"
msgstr "Nije moguće razriješiti putanju \"{$journalPath}\" na časopis."

Expand Down
3 changes: 0 additions & 3 deletions locale/ca/locale.po
Original file line number Diff line number Diff line change
Expand Up @@ -2407,9 +2407,6 @@ msgstr "<p>Cancel·lar l'acceptació d'aquesta galerada.</p>"
msgid "search.cli.rebuildIndex.indexing"
msgstr "Indexant \"{$journalName}\""

msgid "search.cli.rebuildIndex.indexingByJournalNotSupported"
msgstr "La implementació de la cerca no permet reindexació per revista."

msgid "search.cli.rebuildIndex.unknownJournal"
msgstr "La ruta especificada \"{$journalPath}\" no coincideix amb cap revista."

Expand Down
3 changes: 0 additions & 3 deletions locale/ckb/locale.po
Original file line number Diff line number Diff line change
Expand Up @@ -2354,9 +2354,6 @@ msgstr "<p>قبوڵکردنی ئەم تابلۆیە لا ببە.</p>"
msgid "search.cli.rebuildIndex.indexing"
msgstr "ناوەرۆکی \"{$journalName}\""

msgid "search.cli.rebuildIndex.indexingByJournalNotSupported"
msgstr "ئەم گەڕانە ڕێگە بە دوبارە پێنوێنیکردن نادات بە گوێرەی گۆڤار."

msgid "search.cli.rebuildIndex.unknownJournal"
msgstr "ئەم ڕێچکەیەی گۆڤار \"{$journalPath}\"بەردەست نییە."

Expand Down
3 changes: 0 additions & 3 deletions locale/cnr/locale.po
Original file line number Diff line number Diff line change
Expand Up @@ -985,9 +985,6 @@ msgstr ""
msgid "reader.purchasePrice"
msgstr "({$price} {$currency} )"

msgid "search.cli.rebuildIndex.indexingByJournalNotSupported"
msgstr "Ova primjena pretrage ne dozvoljava ponovno indeksiranje po časopisu."

msgid "submission.event.proofread.proofreadRevision"
msgstr "Korigovan fajl korektora je ažuriran"

Expand Down
4 changes: 0 additions & 4 deletions locale/cs/locale.po
Original file line number Diff line number Diff line change
Expand Up @@ -2377,10 +2377,6 @@ msgstr "<p>Odebrání schválení této sazebnice.</p>"
msgid "search.cli.rebuildIndex.indexing"
msgstr "Indexace \"{$journalName}\""

msgid "search.cli.rebuildIndex.indexingByJournalNotSupported"
msgstr ""
"Tato implementace vyhledávání neumožňuje opakované indexování podle časopisů."

msgid "search.cli.rebuildIndex.unknownJournal"
msgstr ""
"Nastavená cesta k časopisu \"{$journalPath}\" nelze přiřadit k časopisu."
Expand Down
4 changes: 0 additions & 4 deletions locale/da/locale.po
Original file line number Diff line number Diff line change
Expand Up @@ -2421,10 +2421,6 @@ msgstr "<p>Fjern godkendelse fra denne publiceringsversion.</p>"
msgid "search.cli.rebuildIndex.indexing"
msgstr "Indeksering af \"{$journalName}\""

msgid "search.cli.rebuildIndex.indexingByJournalNotSupported"
msgstr ""
"Denne søgning tillader ikke en re-indeksering af hver enkelt tidsskrift."

msgid "search.cli.rebuildIndex.unknownJournal"
msgstr ""
"Den angivne tidsskriftssti \"{$journalPath}\" leder ikke frem til et "
Expand Down
4 changes: 0 additions & 4 deletions locale/de/locale.po
Original file line number Diff line number Diff line change
Expand Up @@ -2482,10 +2482,6 @@ msgstr "<p>Freigabe dieser Fahne entfernen.</p>"
msgid "search.cli.rebuildIndex.indexing"
msgstr "Indiziere \"{$journalName}\""

msgid "search.cli.rebuildIndex.indexingByJournalNotSupported"
msgstr ""
"Diese Implementierung der Suche erlaubt keine Neuindizierung pro Journal."

msgid "search.cli.rebuildIndex.unknownJournal"
msgstr "Der angegebene Pfad \"{$journalPath}\" führt zu keiner Zeitschrift."

Expand Down
4 changes: 0 additions & 4 deletions locale/el/locale.po
Original file line number Diff line number Diff line change
Expand Up @@ -2490,10 +2490,6 @@ msgstr "<p>Αποσύρετε την έγκριση για αυτό το τυπ
msgid "search.cli.rebuildIndex.indexing"
msgstr "Ευρετηρίαση του \"{$journalName}\""

msgid "search.cli.rebuildIndex.indexingByJournalNotSupported"
msgstr ""
"Αυτή η εφαρμογή αναζήτησης δεν επιτρέπει επανα-ευρετηρίαση ανά περιοδικό."

msgid "search.cli.rebuildIndex.unknownJournal"
msgstr ""
"Η συγκεκριμένη διαδρομή περιοδικού \"{$journalPath}\" δε μπορεί να καταλήξει "
Expand Down
3 changes: 0 additions & 3 deletions locale/en/locale.po
Original file line number Diff line number Diff line change
Expand Up @@ -2154,9 +2154,6 @@ msgstr "<p>Remove approval of this galley.</p>"
msgid "search.cli.rebuildIndex.indexing"
msgstr "Indexing \"{$journalName}\""

msgid "search.cli.rebuildIndex.indexingByJournalNotSupported"
msgstr "This search implementation does not allow per-journal re-indexing."

msgid "search.cli.rebuildIndex.unknownJournal"
msgstr "The given journal path \"{$journalPath}\" could not be resolved to a journal."

Expand Down
5 changes: 0 additions & 5 deletions locale/es/locale.po
Original file line number Diff line number Diff line change
Expand Up @@ -2439,11 +2439,6 @@ msgstr "<p>Cancelar la aceptación de esta galerada.</p>"
msgid "search.cli.rebuildIndex.indexing"
msgstr "Indexando \"{$journalName}\""

msgid "search.cli.rebuildIndex.indexingByJournalNotSupported"
msgstr ""
"La implementación de la búsqueda no permite la reindexación a nivel de "
"revista."

msgid "search.cli.rebuildIndex.unknownJournal"
msgstr "La ruta \"{$journalPath}\" no corresponde a ninguna revista."

Expand Down
3 changes: 0 additions & 3 deletions locale/es_MX/locale.po
Original file line number Diff line number Diff line change
Expand Up @@ -2044,9 +2044,6 @@ msgstr ""
msgid "search.cli.rebuildIndex.indexing"
msgstr ""

msgid "search.cli.rebuildIndex.indexingByJournalNotSupported"
msgstr ""

msgid "search.cli.rebuildIndex.unknownJournal"
msgstr ""

Expand Down
5 changes: 0 additions & 5 deletions locale/eu/locale.po
Original file line number Diff line number Diff line change
Expand Up @@ -2432,11 +2432,6 @@ msgstr "<p>Ezeztatu galerada honen onarpena.</p>"
msgid "search.cli.rebuildIndex.indexing"
msgstr "\"{$journalName}\" indexatzen"

msgid "search.cli.rebuildIndex.indexingByJournalNotSupported"
msgstr ""
"Bilaketa-inplementazio honek ez du onartzen aldizkariaren araberako "
"berrindexatzea."

msgid "search.cli.rebuildIndex.unknownJournal"
msgstr "\"{$journalPath}\" sarbideak ez darama inongo aldizkaritara."

Expand Down
4 changes: 0 additions & 4 deletions locale/fa/locale.po
Original file line number Diff line number Diff line change
Expand Up @@ -2285,10 +2285,6 @@ msgstr "<p>عدم تأیید این کلیشه چاپی </p>"
msgid "search.cli.rebuildIndex.indexing"
msgstr "نمایه‌سازی \"{$journalName}\""

msgid "search.cli.rebuildIndex.indexingByJournalNotSupported"
msgstr ""
"در سامانه جستجو این وب‌سایت نمایه‌سازی دوباره به ازای هر مجله امکانپدیر نمیباشد"

msgid "search.cli.rebuildIndex.unknownJournal"
msgstr "آدرس \"{$journalPath}\" به عنوان آدرس مجله معتبر نمی باشد"

Expand Down
3 changes: 0 additions & 3 deletions locale/fi/locale.po
Original file line number Diff line number Diff line change
Expand Up @@ -2416,9 +2416,6 @@ msgstr "<p>Poista tämän julkaistavan tiedoston hyväksyntä.</p>"
msgid "search.cli.rebuildIndex.indexing"
msgstr "Indeksointi \"{$journalName}\""

msgid "search.cli.rebuildIndex.indexingByJournalNotSupported"
msgstr "Tämä haun toteutus ei salli julkaisukohtaista uudelleenindeksointia."

msgid "search.cli.rebuildIndex.unknownJournal"
msgstr "Annettu julkaisupolku \"{$journalPath}\" ei johtanut julkaisuun."

Expand Down
4 changes: 0 additions & 4 deletions locale/fr_CA/locale.po
Original file line number Diff line number Diff line change
Expand Up @@ -2485,10 +2485,6 @@ msgstr "<p>Retirer l'approbation de ces épreuves.</p>"
msgid "search.cli.rebuildIndex.indexing"
msgstr "Indexation de « {$journalName} »"

msgid "search.cli.rebuildIndex.indexingByJournalNotSupported"
msgstr ""
"Cette implémentation de recherche ne permet pas la réindexation par revue."

msgid "search.cli.rebuildIndex.unknownJournal"
msgstr ""
"Le chemin d'accès spécifié, soit « {$journalPath} », ne mène à aucune revue."
Expand Down
4 changes: 0 additions & 4 deletions locale/fr_FR/locale.po
Original file line number Diff line number Diff line change
Expand Up @@ -2461,10 +2461,6 @@ msgstr "*<p>Retirer l'approbation pour cette épreuve.</p>"
msgid "search.cli.rebuildIndex.indexing"
msgstr "indexation de \"{$journalName}\""

msgid "search.cli.rebuildIndex.indexingByJournalNotSupported"
msgstr ""
"Cette implémentation de recherche ne permet pas la réindexation par journal."

msgid "search.cli.rebuildIndex.unknownJournal"
msgstr "Le chemin d'accès donné \"{$journalPath}\" ne mène à aucun journal."

Expand Down
5 changes: 0 additions & 5 deletions locale/gd/locale.po
Original file line number Diff line number Diff line change
Expand Up @@ -2526,11 +2526,6 @@ msgstr "<p>Thoir an t-aonta air falbh on ghailearaidh seo.</p>"
msgid "search.cli.rebuildIndex.indexing"
msgstr "Ag inneacsadh “{$journalName}”"

msgid "search.cli.rebuildIndex.indexingByJournalNotSupported"
msgstr ""
"Chan eil an gleus luirg seo a’ ceadachadh ath inneacsadh iris-leabhar air "
"iris-leabhar."

msgid "search.cli.rebuildIndex.unknownJournal"
msgstr ""
"Cha robh an t-slighe “{$journalPath}” a thugadh seachad a’ dol gu iris-"
Expand Down
3 changes: 0 additions & 3 deletions locale/gl/locale.po
Original file line number Diff line number Diff line change
Expand Up @@ -2380,9 +2380,6 @@ msgstr "<p>Cancelar a aceptación desta galerada.</p>"
msgid "search.cli.rebuildIndex.indexing"
msgstr "Indexando \"{$journalName}\""

msgid "search.cli.rebuildIndex.indexingByJournalNotSupported"
msgstr "A implementación da busca non permite a reindexación por revista."

msgid "search.cli.rebuildIndex.unknownJournal"
msgstr ""
"A ruta proporcionada \"{$journalPath}\" non conduce a ningunha revista."
Expand Down
3 changes: 0 additions & 3 deletions locale/hi/locale.po
Original file line number Diff line number Diff line change
Expand Up @@ -2554,9 +2554,6 @@ msgstr "<p> इस गैली का अनुमोदन हटाएँ।
msgid "search.cli.rebuildIndex.indexing"
msgstr "अनुक्रमण \"{$ journalName}\""

msgid "search.cli.rebuildIndex.indexingByJournalNotSupported"
msgstr "यह खोज कार्यान्वयन प्रति-पत्रिका पुन: अनुक्रमण की अनुमति नहीं देता है।"

msgid "search.cli.rebuildIndex.unknownJournal"
msgstr ""
"दिए गए जर्नल पथ \"{$ journalPath}\" को किसी जर्नल से हल नहीं किया जा सकता है।"
Expand Down
4 changes: 0 additions & 4 deletions locale/hr/locale.po
Original file line number Diff line number Diff line change
Expand Up @@ -2409,10 +2409,6 @@ msgstr "<p>Ukloni odobrenje ovog prijeloma.</p>"
msgid "search.cli.rebuildIndex.indexing"
msgstr "Indeksiranje \"{$journalName}\""

msgid "search.cli.rebuildIndex.indexingByJournalNotSupported"
msgstr ""
"Ova provedba pretraživanja ne dozvoljava ponovno indeksiranje po časopisu."

msgid "search.cli.rebuildIndex.unknownJournal"
msgstr "Nije moguće razriješiti putanju \"{$journalPath}\" na časopis."

Expand Down
4 changes: 0 additions & 4 deletions locale/hu/locale.po
Original file line number Diff line number Diff line change
Expand Up @@ -2422,10 +2422,6 @@ msgstr "<p>Jóváhagyás eltávolítása ennél a kefelenyomatnál.</p>"
msgid "search.cli.rebuildIndex.indexing"
msgstr "\"{$journalName}\" folyóirat indexelése"

msgid "search.cli.rebuildIndex.indexingByJournalNotSupported"
msgstr ""
"A keresés végrehajtása nem teszi lehetővé a folyóiratonkénti újraindexelést."

msgid "search.cli.rebuildIndex.unknownJournal"
msgstr ""
"A megadott folyóirat elérési útvonal \"{$journalPath}\" nem meghatározott a "
Expand Down
3 changes: 0 additions & 3 deletions locale/hy/locale.po
Original file line number Diff line number Diff line change
Expand Up @@ -2419,9 +2419,6 @@ msgstr "<p>Հեռացնել այս շարվածքի հաստատումը:</p>"
msgid "search.cli.rebuildIndex.indexing"
msgstr "Ինդեքսավորում է \"{$journalName}\""

msgid "search.cli.rebuildIndex.indexingByJournalNotSupported"
msgstr "Այս որոնման իրականացումը թույլ չի տալիս ըստ ամսագրի վերաինդեքսավորում:"

msgid "search.cli.rebuildIndex.unknownJournal"
msgstr "\"{$journalPath}\" ամսագրի տրված ուղին չի կարող լուծվել ամսագրի համար:"

Expand Down
3 changes: 0 additions & 3 deletions locale/id/locale.po
Original file line number Diff line number Diff line change
Expand Up @@ -2362,9 +2362,6 @@ msgstr "<p>Cabut persetujuan untuk galley ini.</p>"
msgid "search.cli.rebuildIndex.indexing"
msgstr "Mengindeks \"{$journalName}\""

msgid "search.cli.rebuildIndex.indexingByJournalNotSupported"
msgstr "Pencarian ini tidak memungkinkan pengindeksan ulang per jurnal."

msgid "search.cli.rebuildIndex.unknownJournal"
msgstr ""
"Path jurnal yang diberikan \"{$journalPath}\" tidak mengarah ke jurnal "
Expand Down
3 changes: 0 additions & 3 deletions locale/is/locale.po
Original file line number Diff line number Diff line change
Expand Up @@ -2199,9 +2199,6 @@ msgstr "<p>Fjarlægja samþykki á þessu galley.</p>"
msgid "search.cli.rebuildIndex.indexing"
msgstr "Lyklun \"{$journalName}\""

msgid "search.cli.rebuildIndex.indexingByJournalNotSupported"
msgstr "Uppsetning á þessari leit leyfir ekki endurlykklun per tímarit."

msgid "search.cli.rebuildIndex.unknownJournal"
msgstr "Uppgefin slóð fyrir tímarit \"{$journalPath}\" sýnir ekkert tímarit."

Expand Down
5 changes: 0 additions & 5 deletions locale/it/locale.po
Original file line number Diff line number Diff line change
Expand Up @@ -2457,11 +2457,6 @@ msgstr "<p>Rimuovi approvazione di questa gabbia.</p>"
msgid "search.cli.rebuildIndex.indexing"
msgstr "Indicizzazione di \"{$journalName}\""

msgid "search.cli.rebuildIndex.indexingByJournalNotSupported"
msgstr ""
"Questa implementazione della ricerca non permette una re-indicizzazione per "
"rivista."

msgid "search.cli.rebuildIndex.unknownJournal"
msgstr ""
"Questo puntatore, \"{$journalPath}\", non riesce a identificare una rivista "
Expand Down
3 changes: 0 additions & 3 deletions locale/ja/locale.po
Original file line number Diff line number Diff line change
Expand Up @@ -2348,9 +2348,6 @@ msgstr "<p>このゲラの承認を削除する。</p>"
msgid "search.cli.rebuildIndex.indexing"
msgstr "『{$journalName}』インデックス中"

msgid "search.cli.rebuildIndex.indexingByJournalNotSupported"
msgstr "この検索の実装では、雑誌ごとの再インデックス化はできません。"

msgid "search.cli.rebuildIndex.unknownJournal"
msgstr "指定された雑誌パス「{$ journalPath}」を雑誌に定められませんでした。"

Expand Down
3 changes: 0 additions & 3 deletions locale/ka/locale.po
Original file line number Diff line number Diff line change
Expand Up @@ -2406,9 +2406,6 @@ msgstr "<p>ამ სვეტის გამოქვეყნების დ
msgid "search.cli.rebuildIndex.indexing"
msgstr "ინდექსირება \"{$journalName}\""

msgid "search.cli.rebuildIndex.indexingByJournalNotSupported"
msgstr "ძიების ეს ფორმა არ იძლევა ჟურნალის ინდექსირების საშუალებას."

msgid "search.cli.rebuildIndex.unknownJournal"
msgstr ""
"ჟურნალის ამ მდებარეობით \"{$journalPath}\" ვერ ხერხდება ჟურნალის ნახვა."
Expand Down
3 changes: 0 additions & 3 deletions locale/kk/locale.po
Original file line number Diff line number Diff line change
Expand Up @@ -2406,9 +2406,6 @@ msgstr "<p>Отменить одобрение этой гранки.</p>"
msgid "search.cli.rebuildIndex.indexing"
msgstr "Индексирование «{$journalName}»"

msgid "search.cli.rebuildIndex.indexingByJournalNotSupported"
msgstr "Эта реализация поиска не разрешает пожурнальную переиндексацию."

msgid "search.cli.rebuildIndex.unknownJournal"
msgstr "По данному пути к журналу «{$journalPath}» не удается найти журнал."

Expand Down
3 changes: 0 additions & 3 deletions locale/ko/locale.po
Original file line number Diff line number Diff line change
Expand Up @@ -1986,9 +1986,6 @@ msgstr ""
msgid "search.cli.rebuildIndex.indexing"
msgstr ""

msgid "search.cli.rebuildIndex.indexingByJournalNotSupported"
msgstr ""

msgid "search.cli.rebuildIndex.unknownJournal"
msgstr ""

Expand Down
3 changes: 0 additions & 3 deletions locale/lt/locale.po
Original file line number Diff line number Diff line change
Expand Up @@ -1923,9 +1923,6 @@ msgstr ""
msgid "search.cli.rebuildIndex.indexing"
msgstr ""

msgid "search.cli.rebuildIndex.indexingByJournalNotSupported"
msgstr ""

msgid "search.cli.rebuildIndex.unknownJournal"
msgstr ""

Expand Down
5 changes: 0 additions & 5 deletions locale/lv/locale.po
Original file line number Diff line number Diff line change
Expand Up @@ -2382,11 +2382,6 @@ msgstr "<p>Noņemt šī saliktņa apstiprinājumu.</p>"
msgid "search.cli.rebuildIndex.indexing"
msgstr "\"{$journalName}\" indeksēšana"

msgid "search.cli.rebuildIndex.indexingByJournalNotSupported"
msgstr ""
"Šī meklēšanas implementācija neļauj veikt katra žurnāla atkārtotu "
"indeksēšanu."

msgid "search.cli.rebuildIndex.unknownJournal"
msgstr "Norādīto žurnāla ceļu “{$journalPath}” nevarēja atrisināt uz žurnālu."

Expand Down
Loading

0 comments on commit a008e69

Please sign in to comment.