Skip to content

6.2.5

Compare
Choose a tag to compare
@mkalkbrenner mkalkbrenner released this 20 Jul 11:59
· 114 commits to master since this release

Changes since 6.2.4

Added

  • Results and Documents implement JsonSerializable
  • ParallelExecution dispatches PreExecute, PreExecuteRequest, PostExecuteRequest, PostExecute events. It can be combined with plugins that hook into these events (e.g. PostBigRequest).
  • ParallelExecution support for Server queries
  • Solarium\Client::getVersion()

Fixed

  • Adding nested child documents through Document::setField() and Document::addField()

Changed

  • ParallelExecution doesn't replace an existing cURL adapter on the Client. Timeout and proxy settings are honoured on parallel requests.
  • ParallelExecution sets the 'timeout' and 'connectiontimeout' options from (Connection)TimeoutAware adapters when switching to a cURL adapter

Removed

  • Solarium\QueryType\Update\Query\Document::setFilterControlCharacters(), extend Update\Query\Query to use a custom request builder & helper if you don't want control characters filtered

Deprecated

  • Solarium\Client::VERSION

Pitfall when upgrading from 3.x or 4.x or 5.x

Setting "timeout" as "option" in the HTTP Client Adapter is deprecated since Solarium 5.2.0 because not all adapters
could handle it. The adapters which can handle it now implement the TimeoutAwareInterface and you need to set the
timeout using the setTimeout() function after creating the adapter instance.

In order to fix some issues with complex queries using local parameters solarium 6 destinguishs between query parameters
and local parameters to be embedded in a query. Solarium 5.2 already informed you about the deprecation of some
parameter names which are in fact local parameters. Solarium doen't convert them magically anymore.
Local parameter names now have to be prefixed with local_ if set as option of a constructor.

Solarium 5:

$categoriesTerms = new Solarium\Component\Facet\JsonTerms(['key' => 'categories', 'field' => 'cat', 'limit'=>4,'numBuckets'=>true]);

Solarium 6:

$categoriesTerms = new Solarium\Component\Facet\JsonTerms(['local_key' => 'categories', 'field' => 'cat', 'limit'=>4,'numBuckets'=>true]);

See https://lucene.apache.org/solr/guide/8_5/local-parameters-in-queries.html for an introduction about local parameters.

Pitfall when upgrading from 3.x or 4.x

In the past, the V1 API endpoint solr was not added automatically, so most users set it as path on the endpoint.
This bug was discovered with the addition of V2 API support. In almost every setup, the path has to be set to /
instead of /solr with this release!

For the same reason it is a must to explicit configure the core or collection.

So an old setting like

'path' => '/solr/xxxx/'

has to be changed to something like

'path' => '/',
'collection' => 'xxxx',

This led to a problem if the endpoint isn't the default solr. Since 6.2.1, a different context can be configured.

An old settings like

'path' => '/index/xxxx/'

can be changed to something like

'path' => '/',
'context' => 'index',
'collection' => 'xxxx',

This works for SolrCloud instances with a non-default hostContext and Solr instances behind a reverse proxy.