Skip to content

Conversation

@albig
Copy link
Collaborator

@albig albig commented Aug 2, 2019

The CommandLineController is announced as deprecated. As replacement is suggested to use native Symfonie commands or the Extbase Command Controller.

This patch introduces two Symfonie commands kitodo:index and kitodo:reindex.

kitodo:index does the same as the former "dlf index". The parameter of the options have changed slightly. Example:
./vendor/bin/typo3 kitodo:index -d http://example.com/path/mets.xml -p 123 -s dlfCore1

It is possible to use the short parameter names ("-d") or the long ones ("--doc"). You may enter the solr core ("--solr") as UID or as core name. In both cases the existence of the solr core is checked on the given page ("--pid").

kitodo:reindex was used to index a single collection. This is still possible. But you can enter a list of collections as well. Documents will only be reindexed once even if they belong to several collections. Alternatively you can reindex all documents on the given page. Example:

# reindex collection with uid 1 on page 123 with solr core 'dlfCore1'
./vendor/bin/typo3 kitodo:reindex -c 1 -p 123 -s dlfCore1

# reindex collection with uid 1 and 4 on page 123 with solr core 'dlfCore1'
./vendor/bin/typo3 kitodo:reindex -c 1,4 -p 123 -s dlfCore1

# reindex all documents on page 123 with solr core 'dlfCore1'
./vendor/bin/typo3 kitodo:reindex -a -p 123 -s dlfCore1

The new commands were added to the extension documentation. The SQL-queries inside the commands where replaced by Doctrine QueryBuilder.

@sebastian-meyer sebastian-meyer self-requested a review August 19, 2019 10:52
@sebastian-meyer sebastian-meyer added the ⟳ maintenance A task to keep the code up-to-date and manageable. label Aug 19, 2019
@sebastian-meyer
Copy link
Member

In order to remove the old command line interface completely we have to remove the checks in Classes/Hooks/ConfigurationForm.php (and probably some other places) as well.

@sebastian-meyer sebastian-meyer self-assigned this Aug 21, 2019
@albig
Copy link
Collaborator Author

albig commented Aug 22, 2019

You are right. The check of an executable cliDispather is obsolete if we drop the old CLI. I added a patch to this pull request.
Maybe there are other places but I am not aware of it.

@sebastian-meyer sebastian-meyer merged commit d0e5285 into kitodo:master Sep 3, 2019
@albig albig deleted the cli-new branch July 19, 2021 13:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

⟳ maintenance A task to keep the code up-to-date and manageable.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants