mirror of
https://github.com/Codappix/search_core.git
synced 2024-11-22 15:36:12 +01:00
Merge pull request #113 from Codappix/hotfix/111-do-not-register-elasticsearch-by-default
FEATURE: Allow to disable elasticsearch integration
This commit is contained in:
commit
f42b58bdcf
4 changed files with 24 additions and 6 deletions
|
@ -5,9 +5,12 @@
|
||||||
Configuration
|
Configuration
|
||||||
=============
|
=============
|
||||||
|
|
||||||
|
Installation wide configuration is handled inside of the extension manager. Just check out the
|
||||||
|
options there, they all have labels.
|
||||||
|
|
||||||
The extension offers the following configuration options through TypoScript. If you overwrite them
|
The extension offers the following configuration options through TypoScript. If you overwrite them
|
||||||
through `setup` make sure to keep them in the `module` area as they will be accessed from backend
|
through `setup` make sure to keep them in the `module` area as they will be accessed from backend
|
||||||
mode of TYPO3. Do so by placing the following line at the end::
|
mode of TYPO3 for indexing. Do so by placing the following line at the end::
|
||||||
|
|
||||||
module.tx_searchcore < plugin.tx_searchcore
|
module.tx_searchcore < plugin.tx_searchcore
|
||||||
|
|
||||||
|
|
|
@ -19,4 +19,8 @@ In that case you need to install all dependencies yourself. Dependencies are:
|
||||||
Afterwards you need to enable the extension through the extension manager and include the static
|
Afterwards you need to enable the extension through the extension manager and include the static
|
||||||
TypoScript setup.
|
TypoScript setup.
|
||||||
|
|
||||||
|
If you **don't** want to use the included elasticsearch integration, you have to disable it in the
|
||||||
|
extension manager configuration of the extension by checking the checkbox.
|
||||||
|
It's currently enabled by default but will be moved into its own extension in the future.
|
||||||
|
|
||||||
.. _downloading: https://github.com/DanielSiepmann/search_core/archive/master.zip
|
.. _downloading: https://github.com/DanielSiepmann/search_core/archive/master.zip
|
||||||
|
|
4
ext_conf_template.txt
Normal file
4
ext_conf_template.txt
Normal file
|
@ -0,0 +1,4 @@
|
||||||
|
disable {
|
||||||
|
# cat=basic/enable; type=boolean; label=Disable Elasticsearch, which is enabled by default
|
||||||
|
elasticsearch = true
|
||||||
|
}
|
|
@ -37,11 +37,18 @@ call_user_func(
|
||||||
]
|
]
|
||||||
);
|
);
|
||||||
|
|
||||||
\TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\CMS\Extbase\Object\Container\Container')
|
// API does make use of object manager, therefore use GLOBALS
|
||||||
->registerImplementation(
|
$extensionConfiguration = unserialize($GLOBALS['TYPO3_CONF_VARS']['EXT']['extConf'][$extensionKey]);
|
||||||
'Codappix\SearchCore\Connection\ConnectionInterface',
|
if ($extensionConfiguration === false
|
||||||
'Codappix\SearchCore\Connection\Elasticsearch'
|
|| !isset($extensionConfiguration['disable.']['elasticsearch'])
|
||||||
);
|
|| $extensionConfiguration['disable.']['elasticsearch'] !== '1'
|
||||||
|
) {
|
||||||
|
\TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(\TYPO3\CMS\Extbase\Object\Container\Container::class)
|
||||||
|
->registerImplementation(
|
||||||
|
\Codappix\SearchCore\Connection\ConnectionInterface::class,
|
||||||
|
\Codappix\SearchCore\Connection\Elasticsearch::class
|
||||||
|
);
|
||||||
|
}
|
||||||
},
|
},
|
||||||
$_EXTKEY
|
$_EXTKEY
|
||||||
);
|
);
|
||||||
|
|
Loading…
Reference in a new issue