6.2.8
Changes since 6.2.7
Added
- PHP 8.2 support
- JSON formatted update requests
- Solarium\Component\Highlighting\Highlighting::setQueryFieldPattern()
Changes since 6.2.6
Added
- Core\Client\Adapter\Curl::setProxy() to set proxy (instead of through options)
- Proxy support for Http adapter with Core\Client\Adapter\Http::setProxy()
- Authorization token support
Fixed
- Plugins unregister event listeners when removed with Client::removePlugin()
- Workaround for opcache.preload issue in deprected code unless 6.3.0 will be released
Changed
RequestBuilder
s must set a Content-Type on theRequest
for POST and PUT requests.Adapter
s no longer set a default.
Deprecated
- Setting proxy on the Curl adapter through options, use setProxy() instead
Changes since 6.2.5
Fixed
- An empty array for a multiValued field was wrongly interpreted as an empty child document by the Update request builder in 6.2.5
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()
andDocument::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.