Skip to content

Release 12.0.0

Compare
Choose a tag to compare
@dkd-kaehm dkd-kaehm released this 16 Oct 11:12
· 144 commits to main since this release

New in this release:

Huge improvements

TYPO3 12 LTS compatibility (12.4.3+)

With EXT:solr 12.0 we provide the support of TYPO3 12 LTS.

Please note that we require at least TYPO3 12.4.3, as this version contains some change concerning to Fluid.

!!! Upgrade to Apache Solr 9.3.0

This release requires Apache Solr v 9.3.0+.

Note: On third party installations enabling stream feature via the ENV vars or system properties is required.

Following variables must be set in solr.in.sh file or in Solr system props:

  • SOLR_ENABLE_REMOTE_STREAMING=true
  • SOLR_ENABLE_STREAM_BODY=true

For more information see:

Reworked Search Query Component System

The Search Component system, which is used to enrich the search query (e.g.
by faceting, boosting, debug analysis), has been completely reworked by
utilizing the PSR-14 event system.

At the same time the Search Query Modifiers have been merged into the
Query Component systems.

All built-in components are now reworked and utilize the
ApacheSolrForTypo3\Solr\Event\Search\AfterSearchQueryHasBeenPreparedEvent
PSR-14 event.

The interface ApacheSolrForTypo3\Solr\Domain\Search\SearchRequestAware has been removed.

The hook $GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['solr']['modifySearchQuery']
and the interfaces ApacheSolrForTypo3\Solr\Query\Modifier as well
as ApacheSolrForTypo3\Solr\Search\QueryAware and ApacheSolrForTypo3\Solr\Search\SearchAware
have been removed. The modifiers have been merged into Components.

Registration does not happen in ext_localconf.php anymore via ApacheSolrForTypo3\Solr\Search\SearchComponentManager
which has been removed, but now happens in :file:Configuration/Services.yaml
as documented in TYPO3 Core's PSR-14 Registration API.

Related hooks around this system have been moved to PSR-14 events as well:

  • $GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['solr']['beforeSearch'] has
    been replaced by ApacheSolrForTypo3\Solr\Event\Search\AfterInitialSearchResultSetHasBeenCreatedEvent
  • $GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['solr']['afterSearch'] has been
    been replaced by ApacheSolrForTypo3\Solr\Event\Search\AfterSearchHasBeenExecutedEvent

SignalSlots replaced by PSR-14 events

The previously available Extbase Signals have been removed from EXT:solr in favor of PSR-14 Events.

  • The signal ApacheSolrForTypo3\Solr\Domain\Index\IndexService::beforeIndexItems
    has been replaced by ApacheSolrForTypo3\Solr\Event\Indexing\BeforeItemsAreIndexedEvent
  • The signal ApacheSolrForTypo3\Solr\Domain\Index\IndexService::beforeIndexItem
    has been replaced by ApacheSolrForTypo3\Solr\Event\Indexing\BeforeItemIsIndexedEvent
  • The signal ApacheSolrForTypo3\Solr\Domain\Index\IndexService::afterIndexItem
    has been replaced by ApacheSolrForTypo3\Solr\Event\Indexing\AfterItemHasBeenIndexedEvent
  • The signal ApacheSolrForTypo3\Solr\Domain\Index\IndexService::afterIndexItems
    has been replaced by ApacheSolrForTypo3\Solr\Event\Indexing\AfterItemsHaveBeenIndexedEvent
  • The signal ApacheSolrForTypo3\Solr\Domain\Search\ResultSet\Facets\OptionBased\Options\OptionFacetParser::optionsParsed
    has been replaced by ApacheSolrForTypo3\Solr\Event\Parser\AfterFacetIsParsedEvent
  • The signal ApacheSolrForTypo3\Solr\Controller\SearchController::resultsAction
    has been replaced by ApacheSolrForTypo3\Solr\Event\Search\BeforeSearchResultIsShownEvent
  • The signal ApacheSolrForTypo3\Solr\Controller\SearchController::formAction
    has been replaced by ApacheSolrForTypo3\Solr\Event\Search\BeforeSearchFormIsShownEvent
  • The signal ApacheSolrForTypo3\Solr\Controller\SearchController::frequentlySearchedAction
    has been replaced by ApacheSolrForTypo3\Solr\Event\Search\AfterFrequentlySearchHasBeenExecutedEvent
  • The signal ApacheSolrForTypo3\Solr\Controller\SearchController::beforeSearch
    has been removed (see the new PSR-14 events below)

Hooks replaced by PSR-14 events

The previously available hooks and their respective interfaces have been removed from EXT:solr.

The hook $GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['solr']['Indexer']['indexPageAddDocuments'] and its
interface ApacheSolrForTypo3\Solr\AdditionalPageIndexer are now superseded
by the PSR-14 event ApacheSolrForTypo3\Solr\Event\Indexing\BeforePageDocumentIsProcessedForIndexingEvent.

The hook $GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['solr']['modifyVariantId'] and its
interface ApacheSolrForTypo3\Solr\Variants\IdModifier are now superseded
by the PSR-14 event ApacheSolrForTypo3\Solr\Event\Variants\AfterVariantIdWasBuiltEvent.

The hook $GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['solr']['IndexQueueIndexer']['preAddModifyDocuments'] and its
interface ApacheSolrForTypo3\Solr\PageIndexerDocumentsModifier are now superseded
by the PSR-14 event ApacheSolrForTypo3\Solr\Event\Indexing\BeforeDocumentIsProcessedForIndexingEvent.

The hook $GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['solr']['IndexQueueIndexer']['indexItemAddDocuments'] and its
interface ApacheSolrForTypo3\Solr\AdditionalIndexQueueItemIndexer are now superseded
by the PSR-14 event ApacheSolrForTypo3\Solr\Event\Indexing\BeforeDocumentsAreIndexedEvent.

The hook $GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['solr']['Indexer']['indexPageSubstitutePageDocument'] and its
interface ApacheSolrForTypo3\Solr\SubstitutePageIndexer are now superseded
by the PSR-14 event ApacheSolrForTypo3\Solr\Event\Indexing\AfterPageDocumentIsCreatedForIndexingEvent.

The hook $GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['solr']['postProcessIndexQueueInitialization'] and its
interface ApacheSolrForTypo3\Solr\IndexQueue\InitializationPostProcessor are now superseded
by the PSR-14 event ApacheSolrForTypo3\Solr\Event\IndexQueue\AfterIndexQueueHasBeenInitializedEvent

The hook $GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['solr']['postProcessFetchRecordsForIndexQueueItem'] is now superseded
by the PSR-14 event ApacheSolrForTypo3\Solr\Event\IndexQueue\AfterRecordsForIndexQueueItemsHaveBeenRetrievedEvent

The hook $GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['solr']['IndexQueuePageIndexer']['dataUrlModifier']
and the according interface ApacheSolrForTypo3\Solr\IndexQueue\PageIndexerDataUrlModifier
is now superseded by the PSR-14 event ApacheSolrForTypo3\Solr\Event\Indexing\AfterFrontendPageUriForIndexingHasBeenGeneratedEvent

The hook $GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['solr']['postProcessIndexQueueUpdateItem']
is now superseded by the PSR-14 event ApacheSolrForTypo3\Solr\Event\Indexing\AfterIndexQueueItemHasBeenMarkedForReindexingEvent

PSR-14 events renamed

Previous PSR-14 events have been renamed to be consistent with other PSR-14 Events in EXT:solr.

  • ApacheSolrForTypo3\Solr\Event\Routing\PostProcessUriEvent is now named ApacheSolrForTypo3\Solr\Event\Routing\AfterUriIsProcessedEvent
  • ApacheSolrForTypo3\Solr\Event\Routing\BeforeProcessCachedVariablesEvent is now named ApacheSolrForTypo3\Solr\Event\Routing\BeforeCachedVariablesAreProcessedEvent
  • ApacheSolrForTypo3\Solr\Event\Routing\BeforeReplaceVariableInCachedUrlEvent is now named ApacheSolrForTypo3\Solr\Event\Routing\BeforeVariableInCachedUrlAreReplacedEvent

!!! Shortcut pages not indexed anymore

Currently there is no important reason to index the shortcut pages,
because the target pages are indexed as expected and the shortcuts are 307-redirected to their targets.
So contents can be found in search results as expected.

!!! Deprecated Node class removed

Former EXT:solr versions used an own node implementation for Solr endpoints, this implementation (\ApacheSolrForTypo3\Solr\System\Solr\Node) is now removed in favor of the Endpoint implementation of Solarium.

If you've used this class or the SolrConnection directly, you have to adapt your PHP code:

  • use \Solarium\Core\Client\Endpoint instead of \ApacheSolrForTypo3\Solr\System\Solr\Node
  • call \ApacheSolrForTypo3\Solr\System\Solr\SolrConnection->getEndpoint() instead of \ApacheSolrForTypo3\Solr\System\Solr\SolrConnection\getNode(),
    method will return Solarium Endpoint
  • Node could be converted to string to get the core base URI, getCoreBaseUri() can be used instead.

Note: With dropping the Node implementation we also dropped the backwards compatibility that allows to define the Solr path segment "/solr" within "solr_path_read" or "solr_path_write". Be sure your configuration doesn't contain this path segment!

!!! Changed visibility of ApacheSolrForTypo3\Solr\IndexQueue\FrontendHelper\PageIndexer methods

For testing purposes some methods of the PageIndexer were defined as public, these methods are now protected. The tests are adapted accordingly, so that there is no need to declare the methods as public.
If you have used one of this methods, you have to adapt your code. Affected methods:

  • setupConfiguration
  • index
  • indexPage

!!! Solr route enhancer disabled by default

EXT:solr offers the possibility to create speaking URLs for Solr facets, but as this feature requires additional configuration and costly processing this feature is now disabled by default.

If you've already used the route enhancer you must set option "enableRouteEnhancer":

$GLOBALS['TYPO3_CONF_VARS']['EXTENSIONS']['solr']['enableRouteEnhancer']

Frontend Helper Changes

The FrontendHelper logic revolving around PageIndexer has been reduced to
a minimum by only having two methods available:

  • ApacheSolrForTypo3\Solr\IndexQueue\FrontendHelper\FrontendHelper::activate() - used to register hooks and PSR-14 event listeners
  • ApacheSolrForTypo3\Solr\IndexQueue\FrontendHelper\FrontendHelper::deactivate(PageIndexerResponse $response) - used to populate data into the PageIndexerResponse object

The actual PageIndexerRequest object is now available as a property of TYPO3's
Request object as attribute named "solr.pageIndexingInstructions".

!!!Complex query in FlexForm filter value

It is now possible to use complex query in FlexForm filter value.
If the value contains space and no special characters, the value is always automatically escaped.

The old behaviour is still working,
so if a string value contains space(s) and no special characters of the solr query parser,
the string is always wrapped with double quotes.
But if the string contains special characters no wrapping happen
special characters are: + - && || ! ( ) { } [ ] ^ " ~ * ? : \

There is some cases where this change can break,
for example if the filter value is something like
toto AND tata or music (rock) or my "flow" is.
Here the wrapping and the escaping of the inner double quote have to be manually updated like this
"toto AND tata" or "music (rock)" and "my \"flow\" is".

All Changes

Contributors

Like always this release would not have been possible without the help from our
awesome community. Here are the contributors to this release.

(patches, comments, bug reports, reviews, ... in alphabetical order)

  • Achim Fritz
  • Albrecht Köhnlein
  • Alexander Nitsche
  • Andreas Kießling
  • André Buchmann
  • Bastien Lutz
  • Benni Mack
  • Benoit Chenu
  • Christoph Lehmann
  • Dmitry Dulepov
  • Elias Häußler
  • Eric Chavaillaz
  • Ernesto Baschny
  • Fabio Norbutat
  • Florian Rival
  • Georg Ringer
  • Harald Witt
  • Henrik Elsner
  • Ingo Fabbri
  • Jennifer Geiß
  • Lars Tode
  • Lukas Niestroj
  • Mario Lubenka
  • Markus Friedrich
  • @n3amil / Cypelt <https://github.com/n3amil>_
  • Oliver Bartsch
  • Rafael Kähm
  • René Maas
  • Sascha Nowak
  • Sascha Schieferdecker
  • Sebastian Schreiber
  • Silvia Bigler
  • Stefan Frömken
  • Steve Lenz
  • Stämpfli Kommunikation
  • Sven Teuber
  • Till Hörner
  • Tim Dreier
  • Tobias Hövelborn
  • Tobias Schmidt
  • Torben Hansen
  • @twojtylak <https://github.com/twojtylak>_

EB Partners

Also a big thank you to our partners who have already concluded one of our new development participation packages such
as Apache Solr EB for TYPO3 12 LTS (Feature):

  • .hausformat GmbH
  • b13 GmbH
  • clickstorm GmbH
  • Connecta AG
  • cron IT GmbH
  • CS2 AG
  • digit.ly GmbH
  • FTI Touristik GmbH
  • Hochschule Furtwangen
  • in2code GmbH
  • internezzo ag
  • jweiland.net
  • Kassenärztliche Vereinigung Rheinland-Pfalz
  • KONVERTO AG
  • Leuchtfeuer Digital Marketing GmbH
  • Lingner Consulting New Media GmbH
  • LOUIS INTERNET GmbH
  • mehrwert intermediale kommunikation GmbH
  • plan2net GmbH
  • queo GmbH
  • Québec.ca gouv.qc.ca
  • Snowflake Productions GmbH
  • Stadtverwaltung Villingen-Schwenningen
  • Stämpfli AG
  • unternehmen online GmbH & Co. KG
  • VisionConnect GmbH
  • WIND INTERNET

How to Get Involved

There are many ways to get involved with Apache Solr for TYPO3:

  • Submit bug reports and feature requests on GitHub
  • Ask or help or answer questions in our Slack channel
  • Provide patches through pull requests or review and comment on
    existing pull requests
  • Go to www.typo3-solr.com or call dkd to sponsor the ongoing
    development of Apache Solr for TYPO3

Support us by becoming an EB partner:
https://shop.dkd.de/Produkte/Apache-Solr-fuer-TYPO3/

or call:
+49 (0)69 - 2475218 0