Skip to content

Commit cdc8dbe

Browse files
committed
Merge pull request #20 from Flowpack/issue-19
[TASK] Use realtimeIndexing.enabled from TYPO3CR.Search settings
2 parents a500c9c + 053e95c commit cdc8dbe

File tree

3 files changed

+3
-6
lines changed

3 files changed

+3
-6
lines changed

Classes/Flowpack/ElasticSearch/Indexer/Aspect/IndexerAspect.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ class IndexerAspect {
2727
protected $objectIndexer;
2828

2929
/**
30-
* @Flow\AfterReturning("setting(Flowpack.ElasticSearch.realtimeIndexing.enabled) && within(TYPO3\Flow\Persistence\PersistenceManagerInterface) && method(public .+->(add|update)())")
30+
* @Flow\AfterReturning("setting(TYPO3.TYPO3CR.Search.realtimeIndexing.enabled) && within(TYPO3\Flow\Persistence\PersistenceManagerInterface) && method(public .+->(add|update)())")
3131
* @param \TYPO3\Flow\Aop\JoinPointInterface $joinPoint
3232
* @return string
3333
*/
@@ -38,7 +38,7 @@ public function updateObjectToIndex(\TYPO3\Flow\Aop\JoinPointInterface $joinPoin
3838
}
3939

4040
/**
41-
* @Flow\AfterReturning("setting(Flowpack.ElasticSearch.realtimeIndexing.enabled) && within(TYPO3\Flow\Persistence\PersistenceManagerInterface) && method(public .+->(remove)())")
41+
* @Flow\AfterReturning("setting(TYPO3.TYPO3CR.Search.realtimeIndexing.enabled) && within(TYPO3\Flow\Persistence\PersistenceManagerInterface) && method(public .+->(remove)())")
4242
* @param \TYPO3\Flow\Aop\JoinPointInterface $joinPoint
4343
* @return string
4444
*/

Classes/Flowpack/ElasticSearch/Package.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ public function boot(\TYPO3\Flow\Core\Bootstrap $bootstrap) {
4545
*/
4646
public function prepareRealtimeIndexing(\TYPO3\Flow\Core\Bootstrap $bootstrap) {
4747
$this->configurationManager = $bootstrap->getObjectManager()->get('TYPO3\Flow\Configuration\ConfigurationManager');
48-
$settings = $this->configurationManager->getConfiguration(\TYPO3\Flow\Configuration\ConfigurationManager::CONFIGURATION_TYPE_SETTINGS, $this->getPackageKey());
48+
$settings = $this->configurationManager->getConfiguration(\TYPO3\Flow\Configuration\ConfigurationManager::CONFIGURATION_TYPE_SETTINGS, 'TYPO3.TYPO3CR.Search');
4949
if (isset($settings['realtimeIndexing']['enabled']) && $settings['realtimeIndexing']['enabled'] === TRUE) {
5050
$bootstrap->getSignalSlotDispatcher()->connect('Flowpack\ElasticSearch\Indexer\Object\Signal\SignalEmitter', 'objectUpdated', 'Flowpack\ElasticSearch\Indexer\Object\ObjectIndexer', 'indexObject');
5151
$bootstrap->getSignalSlotDispatcher()->connect('Flowpack\ElasticSearch\Indexer\Object\Signal\SignalEmitter', 'objectPersisted', 'Flowpack\ElasticSearch\Indexer\Object\ObjectIndexer', 'indexObject');

Configuration/Settings.yaml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,8 @@ Flowpack:
55
default:
66
- host: localhost
77
port: 9200
8-
- host: localhost
9-
port: 9201
108

119
realtimeIndexing:
12-
enabled: TRUE
1310
client: default
1411
transfer:
1512
# The timeout in sections for connections between Flow and Elastic Search:

0 commit comments

Comments
 (0)