Comments (2)
Here a diff of making that happen:
diff --git a/typo3conf/ext/tika/Classes/Report/TikaStatus.php b/typo3conf/ext/tika/Classes/Report/TikaStatus.php
index 9ba5367b..aec032fb 100644
--- a/typo3conf/ext/tika/Classes/Report/TikaStatus.php
+++ b/typo3conf/ext/tika/Classes/Report/TikaStatus.php
@@ -26,6 +26,7 @@ namespace ApacheSolrForTypo3\Tika\Report;
use ApacheSolrForTypo3\Solr\ConnectionManager;
use ApacheSolrForTypo3\Tika\Service\Tika\ServerService;
+use ApacheSolrForTypo3\Tika\Service\Tika\SolrCellQuery;
use ApacheSolrForTypo3\Tika\Utility\FileUtility;
use TYPO3\CMS\Core\Utility\CommandUtility;
use TYPO3\CMS\Core\Utility\GeneralUtility;
@@ -180,6 +181,23 @@ class TikaStatus implements StatusProviderInterface
$solr = $this->getSolrServiceFromTikaConfiguration();
$solr->ping();
+
+ // Perform a n extraction query to load the queryhandler if it is configured for lazy-loading.
+ $query = GeneralUtility::makeInstance(
+ SolrCellQuery::class,
+ GeneralUtility::getFileAbsFileName('EXT:tika/ext_emconf.php')
+ );
+ $query->setExtractOnly();
+
+ // todo: this can be removed when we drop EXT:solr 3.1 compatibility
+ $solrVersion = $this->getExtSolrVersion();
+ if(version_compare($solrVersion, '3.1', '>')) {
+ $solr->extractByQuery($query);
+ } else {
+ $solr->extract($query);
+ }
+
+ // Check if plugin is (possibly lazy-) loaded
$plugins = $solr->getPluginsInformation();
if (array_key_exists(
'/update/extract',
@@ -268,4 +286,17 @@ class TikaStatus implements StatusProviderInterface
{
GeneralUtility::devLog($message, $extKey, $severity, $data);
}
+
+ /**
+ * Gets the Solr Version reduced to major and minor digits
+ *
+ * @return float
+ */
+ protected function getExtSolrVersion()
+ {
+ $solrVersion = \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::getExtensionVersion('solr');
+ $strippedSolrVersion = substr($solrVersion, 0, 3);
+
+ return $strippedSolrVersion;
+ }
}
from ext-tika.
Should this become a PR, @LeoniePhiline? ;)
from ext-tika.
Related Issues (20)
- [TASK] Refactor class ServerService: Use TYPO3 PSR-18 client HOT 1
- [TASK] Check and adjust log levels HOT 2
- Illegal string offset 'driverRestrictions' HOT 1
- [BUG] Release 6.0 has no dependency on filemetadata in composer but in emconf HOT 1
- [FEATURE] Tika with Tesseract OCR HOT 2
- [BUG] Usage of removed constant TYPO3_OS
- [TASK] Aware removal of Solr Cell (Tika extraction) on Apache Solr 9.0+
- [TASK] Update TIKA to 1.27 on release-11.0.x HOT 1
- [TASK] Release 11.0.0
- [BUG] Reports module crashes with 503 error
- [BUG] trim() expects string, not null in Tika AppService -> shellOutputToArray function
- Epic [TASK] Make EXT:tika TYPO3 12 LTS compatible HOT 2
- [TASK] Fix ExtensionUtility::registerModule
- [BUG] Broken GitHub Actions : LOCAL_VOLUME_NAME is not set
- [BUG] Error logging in TikaStatus fails
- [BUG] SolrCell broken HOT 1
- [BUG] TikaStatus can't handle all response types of SolrWriteService->extractByQuery() HOT 1
- [TASK] Support for Apache Tika 2+
- [TASK] Raise PHP restriction to 8.3.99 on release-11.0.x HOT 1
- [TASK] Release 11.0.2 HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ext-tika.