Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[TASK] Streamline all hooks for solr document manipulations #3441

Open
dkd-kaehm opened this issue Dec 23, 2022 · 0 comments
Open

[TASK] Streamline all hooks for solr document manipulations #3441

dkd-kaehm opened this issue Dec 23, 2022 · 0 comments

Comments

@dkd-kaehm
Copy link
Collaborator

What should be done in the scope of this task?
EXT:solr* has to many hooks to modify Apache Solr documents.
We want a straight line with single way to modify and/or add Apache Solr documents.

Current state:

  • $GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['solr']['IndexQueueIndexer']['preAddModifyDocuments']
  • $GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['solr']['IndexQueueIndexer']['indexItemAddDocuments']
  • $GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['solr']['Indexer']['indexPagePostProcessPageDocument']
  • $GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['solr']['Indexer']['indexPageSubstitutePageDocument']
  • $GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['solr']['Indexer']['indexPageAddDocuments']
dkd-kaehm pushed a commit that referenced this issue Jun 2, 2023
This change adds new PSR-14 events:

* `ApacheSolrForTypo3\Solr\Event\Indexing\BeforePageDocumentIsProcessedForIndexingEvent`
previously used with `$GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['solr']['Indexer']['indexPageAddDocuments']`

* `ApacheSolrForTypo3\Solr\Event\Indexing\BeforeDocumentIsProcessedForIndexingEvent`
previously used with `$GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['solr']['IndexQueueIndexer']['preAddModifyDocuments']`

* `ApacheSolrForTypo3\Solr\Event\Indexing\BeforeDocumentsAreIndexedEvent`
previously used with `$GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['solr']['IndexQueueIndexer']['indexItemAddDocuments']`

This way, EXT:solr migrates to PSR-14 events and adds a more defined way to utilize the PHP API and to help extension authors to understand what is used in EXT:solr.

The hooks
* `$GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['solr']['IndexQueueIndexer']['preAddModifyDocuments']`
* `$GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['solr']['IndexQueueIndexer']['indexItemAddDocuments']`
* `$GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['solr']['Indexer']['indexPageAddDocuments']`

are now removed in favor of the new events.

These interfaces related to the hooks are removed:
* `ApacheSolrForTypo3\Solr\IndexQueue\PageIndexerDocumentsModifier`
* `ApacheSolrForTypo3\Solr\IndexQueue\AdditionalIndexQueueItemIndexer`
* `ApacheSolrForTypo3\Solr\AdditionalPageIndexer`

Documentation is added, tests are adapted.

Relates: #3376, #3441
Fixes: #3437
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

No branches or pull requests

1 participant