PHP Solr client library

Overview

Solarium PHP Solr Client Library

What is Solarium?

Solarium is a PHP Solr client library that accurately models Solr concepts. Where many other Solr libraries only handle the communication with Solr, Solarium also relieves you of handling all the complex Solr query parameters using a well documented API.

Please see the docs for a more detailed description.

Requirements

Solarium 6.x only supports PHP 7.3 and up.

It's highly recommended to have cURL enabled in your PHP environment. However if you don't have cURL available you can switch from using cURL (the default) to a pure PHP based HTTP client adapter which works for the essential stuff but doesn't support things like parallel query execution.

Alternatively you can inject any PSR-18 compatible HTTP Client using the Psr18Adapter.

Getting started

The preferred way to install Solarium is by using Composer. Solarium is available on Packagist.

Example:

composer require solarium/solarium

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 distinguishes 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/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',

Run the examples

To run the examples read through the Example code section of https://solarium.readthedocs.io/en/stable/getting-started/

Run the tests

The phpunit tests contain some integration tests that require a running Solr instance. And this Solr instance requires some special configuration. Have a look at .github/workflows/run-tests.yml to see how to start a well configured Solr docker container locally. If you just want to run the unit tests, just ensure that there's no other Solr server listening on the standard port 8983 and the integration tests will be skipped.

You can run the tests in a Windows environment. For all of them to pass, you must make sure to checkout with LF line endings.

More information

Continuous Integration status

  • Run Tests
  • codecov
  • SensioLabsInsight
  • Total Downloads
Comments
  • Add Guzzle 6 Adapter implementation

    Add Guzzle 6 Adapter implementation

    This pull request adds a Guzzle 6 Adapter implementation.

    To avoid backwards breaking compatiblity the composer.json file was changed to allow for guzzle 3 or 6. The unit tests will also be marked as skipped depending on which version is installed.

    opened by chadicus 54
  • Examples and integration test for atomic updates

    Examples and integration test for atomic updates

    Added a basic example of atomic updates (set and inc modifiers).

    Updated the docs:

    • Listed all available modifiers.
    • Included the example.
    • Mentioned that it depends on your schema.
    • Updated the link to the latest Solr manual.

    Integration test for all available modifiers.

    This closes #499.

    opened by thomascorthals 27
  • Queries without keywords

    Queries without keywords

    With the 2.0 RC1 release, I am trying to perform a query based on a field, and I only get results if I have set keywords. This does not produce results:

    <?php
    $query = $solr->createSelect(); 
    $filterQuery = $query->createFilterQuery();
    $filterQuery->setKey('lesson_id')
       ->addTag('lesson_id')
       ->setQuery('is_lesson_id:'.$recipe_id);
    $query->addFilterQuery($filterQuery);
    $result = $solr->select($query);
    ?>
    

    This does produce results:

    <?php
    $query = $solr->createSelect(); 
    $query->setQuery('penne');
    $filterQuery = $query->createFilterQuery();
    $filterQuery->setKey('lesson_id')
      ->addTag('lesson_id')
      ->setQuery('is_lesson_id:'.$recipe_id);
    $query->addFilterQuery($filterQuery);
    $result = $solr->select($query);
    ?>
    

    What am I doing wrong?

    opened by ebeyrent 26
  • Error thrown building Request: Extract Query file path/url invalid or not available

    Error thrown building Request: Extract Query file path/url invalid or not available

    I am trying to get past an error that is being thrown when I try to index one specific file type in my application. I am able to index everything except these files .htm files, they all and in !.htm or !.HTM

    Below are the specifics of my server and configurations:

    Application: Silverstripe -v 4.6 web application Servers: Web server and Solr(stand alone) server are Ubuntu 20.04 PHP: version 7.4 Apache: 2.4.46 Solr version: 8.7 Solarium version: 4.1

    composer.json file:

        "name": "silverstripe/installer",
        "description": "The SilverStripe Framework Installer",
        "require": {
            "php": ">=7.1.0",
            "silverstripe/display-logic": "^2.0",
            "undefinedoffset/sortablegridfield": "^2.0",
            "silverstripe/widgets": "^2.0",
            "kinglozzer/metatitle": "^2.0",
            "silverstripe/googlesitemaps": "^2.1",
            "solarium/solarium": "^4.1",
            "silverstripe/recipe-cms": "~4.6",
            "google/recaptcha": "^1.2",
            "colymba/gridfield-bulk-editing-tools": "^3.0.0",
            "wildbit/postmark-php": "^4.0.0",
            "sheadawson/silverstripe-dependentdropdownfield": "^2.0"
        },
        "config": {
            "platform": {
                "php": "7.3.22"
            },
            "process-timeout": 600
        },
        "minimum-stability": "dev",
        "prefer-stable": true,
        "extra": {
            "project-files-installed": [
                "app/.htaccess",
                "app/_config.php",
                "app/_config/mimevalidator.yml",
                "app/_config/mysite.yml",
                "app/src/Page.php",
                "app/src/PageController.php"
            ],
            "public-files-installed": [
                ".htaccess",
                "index.php",
                "install-frameworkmissing.html",
                "install.php",
                "web.config"
            ]
        }
    }
    

    This is what I am trying to do:

    Config.php

    //Solr Config, this is set to the constant SOLR_CONFIG
    $solr_config = array(
        'endpoint' => array(
            'localhost' => array(
                'host' => 'obfuscated',
                'port' => 8983,
                'path' => '/solr/my_core_name/',
            )
        )
    );
    
    Indexing-Utility-Class.php
    
    // get solr client
    public static function fetchClient()
    	{
    		return new Solarium\Client(json_decode(SOLR_CONFIG));
    	}
    
    //index Statute
    public static function IndexStatutes($TitleNumber = null){
    
        //get files
        Do code ..... 
    
          //doing a bunch of stuff to make a urlencoded string until we end up with $url
          $url = '/path/to/the/docs/to/index/filename\!\.htm';
    
           $properties = array(
                  //these are all schema relative document properties
             );
    
    //call solerium
    $result = self::callSolerium($url, $properties)
    
    return $result;
    }
         
    // call solerium
    public static function callSoleruim($doc_path, $properties) {
    		// create a client instance
    		$client = self::fetchClient();
    
    		// get an extract query instance and add settings
    		$query = $client->createExtract();
    		$query->addFieldMapping('content', 'text');
    		$query->setUprefix('attr_');
    		$query->setFile($doc_path);
    		$query->setCommit(true);
    		$query->setOmitHeader(false);
    
    		// add document
    		$doc = $query->createDocument();
    		foreach ($properties as $key => $property) {
    			$doc->{$key} = $property;
    		}
    		$query->setDocument($doc);
    
    		// this executes the query and returns the result
    		try {
    			
    			$result = $client->extract($query); 
    
                            // Headers use to be needed for docs in SS 3 projects, maybe we will need again ??
    			//  $headers = array('Content-Type:multipart/form-data;boundary=gc0p4Jq0M2Yt08jU534c0p');
    			//  $request = $client->createRequest($query);
    			//  $request->addHeaders($headers);
    			//  $result = $client->executeRequest($request);
    
    			echo "<b>Extract query executed</b><br/>\n";
    			print_r($properties, true);
    			echo 'Query status: ' . $result->getStatus(). "<br/>\n";
    			echo 'Query time: ' . $result->getQueryTime(). "<br/>\n";
    			return true;
    
    		} catch (Exception $e) {
    			// echo 'Exception Message is : ' . $e->getMessage(). "<br/>\n"; 
    
     // echo '<pre>'; print_r($e); die;    use me if needed for debugging
    			return false;
    		}
    }
    

    when I try to call this I am getting the following error messages:

    /var/apps/vtleg/public/Documents/Statutes/02/fm401!.HTM
    Exception Message is : Extract query file path/url invalid or not available
    /var/apps/vtleg/public/Documents/Statutes/02/fm501!.HTM
    Exception Message is : Extract query file path/url invalid or not available
    /var/apps/vtleg/public/Documents/Statutes/02/fm601!.HTM
    Exception Message is : Extract query file path/url invalid or not available

    the thing is when I copy that path and execute cat command with the path that was just copied, the documents open up on the server.

    When I look at the whole exception I get:

    <pre>Solarium\Exception\RuntimeException Object
    (
        [message:protected] => Extract query file path/url invalid or not available
        [string:Exception:private] => 
        [code:protected] => 0
        [file:protected] => /var/apps/vtleg/vendor/solarium/solarium/src/QueryType/Extract/RequestBuilder.php
        [line:protected] => 76
        [trace:Exception:private] => Array
            (
                [0] => Array
                    (
                        [file] => /var/apps/vtleg/vendor/solarium/solarium/src/Core/Client/Client.php
                        [line] => 721
                        [function] => build
                        [class] => Solarium\QueryType\Extract\RequestBuilder
                        [type] => ->
                        [args] => Array
                            (
                                [0] => Solarium\QueryType\Extract\Query Object
                                    (
                                        [options:protected] => Array
                                            (
                                                [handler] => update/extract
                                                [resultclass] => Solarium\QueryType\Extract\Result
                                                [documentclass] => Solarium\QueryType\Update\Query\Document\Document
                                                [omitheader] => 
                                                [extractonly] => 
                                                [uprefix] => attr_
                                                [file] => /var/apps/vtleg/public/Documents/Statutes/01/ffk01\!\.HTM
                                                [commit] => 1
                                                [document] => Solarium\QueryType\Update\Query\Document\Document Object
                                                    (
                                                        [boost:protected] => 
                                                        [modifiers:protected] => Array
                                                            (
                                                            )
    
                                                        [key:protected] => 
                                                        [fieldBoosts:protected] => Array
                                                            (
                                                                [name] => 
                                                                [literal.name] => 
                                                                [literal.section_id] => 
                                                                [literal.legislature_title] => 
                                                                [literal.legislature_file_title] => 
                                                                [literal.legislature_filename] => 
                                                                [literal.legislature_category] => 
                                                                [literal.parent] => 
                                                                [literal.chapter_id] => 
                                                                [literal.subchapter_id] => 
                                                                [literal.chapter] => 
                                                                [literal.subchapter] => 
                                                            )
    
                                                        [version:protected] => 
                                                        [helper:protected] => Solarium\Core\Query\Helper Object
                                                            (
                                                                [placeHolderPattern:protected] => /%(L|P|T|)([0-9]+)%/i
                                                                [assembleParts:protected] => 
                                                                [derefencedParamsLastKey:protected] => 0
                                                                [query:protected] => Solarium\QueryType\Update\Query\Document\Document Object
     *RECURSION*
                                                            )
    
                                                        [filterControlCharacters:protected] => 1
                                                        [fields:protected] => Array
                                                            (
                                                                [name] => 01-001-001-00001
                                                                [literal.name] => 01-001-001-00001
                                                                [literal.section_id] => 00001
                                                                [literal.legislature_title] => General Provisions
                                                                [literal.legislature_file_title] => 011 V.S.A. §§  1-9 Repealed. 2001, No. 30, Section 3.
                                                                [literal.legislature_filename] => Documents/Statutes/01/ffk01!.HTM
                                                                [literal.legislature_category] => statute
                                                                [literal.parent] => 01
                                                                [literal.chapter_id] => 001
                                                                [literal.subchapter_id] => 001
                                                                [literal.chapter] => VERMONT STATUTES ANNOTATED
                                                                [literal.subchapter] => STATUTORY REVISION COMMISSION; CONTINUOUS REVISION
                                                            )
    
                                                    )
    
                                            )
    
                                        [fieldMappings:protected] => Array
                                            (
                                                [content] => text
                                            )
    
                                        [helper:protected] => 
                                        [params:protected] => Array
                                            (
                                            )
    
                                    )
    
                            )
    
     )
    

    I have tried using the other request type with the headers included, but that does not fix the issue. All of the other document types indexed relatively well with minimal errors using either of the two request types(with headers and without). Why would these .htm files be causing such problems?

    Am I doing something wrong with the library? I know 4.1 is a little old but Solr is running as a stand alone service and everything else seemed to run fine without issue. Is there no way to handle these file types? They are documents retrieved by our client from a LEXIS query and then they are uploaded to thier server. All of the filenames have multiple special characters in them and they all end with an ! so it is file!.htm or file!.HTM

    opened by johnBHGW 25
  • add PSR-18 http adapter

    add PSR-18 http adapter

    As mentioned in https://github.com/solariumphp/solarium/issues/752 this fixes https://github.com/solariumphp/solarium/issues/550 by implementing a PSR-18 based AdapterInterface.

    Todos:

    • [x] add more test cases
    • [x] request http basic authentication headers
    • [x] test it for real with a PSR-18 client implementation on one of my apps with solr
    • [x] deprecate other adapters
    • [ ] deprecate endpoint timeout setting (will be done in a follow-up PR)
    • [x] deprecate adapter options on the client
    • [x] use new Psr18Adapter in integration tests

    I tested it on one of my Symfony work apps and it works nicely together with http plug bundle and nelmio solarium bundle :blush: Just a DI compiler pass for wiring the new adapter needed.

    works

    opened by dmaicher 23
  • Add support for ExtractingRequestHandler (PDF, Word, etc.)

    Add support for ExtractingRequestHandler (PDF, Word, etc.)

    A common use case for Solr is indexing rich document content such as PDF, Word or HTML by using the ExtractingRequestHandler and Tika library. Solarium should support extract queries as part of the standard library.

    I do have a working Solarium plugin that I would like to integrate upstream. It has been tested and used against Solr 1.4 and aside some minor issues works well.

    In order to integrate it, these are the changes I would like to get your feedback on:

    • Add new extract query type
      • Solarium_Query_Extract new
      • Solarium_Client_RequestBuilder_Extract new
      • Solarium_Client_ResponseParser_Update
    • Add support for file uploads in requests
      • Document files are posted to the extract handler in the same way a browser would upload them. The client classes need to support this behaviour.
      • This takes the form of Request::setFile($path) or Request::addFile($path) if we can support multiple files at once.
      • Solarium_Client_Request
      • Solarium_Client_Adapter
    • Add support for multipart/form-data
      • If a large number of literal fields is sent with the extract as GET fields, Tomcat will go belly-up because the query string limit is reached. This can be avoided by submitting all parameters inside the POST body as a multipart/form-data payload. Although not documented in the wiki, Solr supports this request format.
      • This format triggers automatically when a file is added to the request.
      • Should it trigger automatically at a certain number / size of params?
      • Solarium_Client_Adapter_Http
      • Solarium_Client_Adapter_PeclHttp
      • Solarium_Client_Adapter_ZendHttp
    • Docs
      • Update docs according to new capabilities

    Let me know your thoughts on the approach described and I'll start working on the integration. By the way, Solarium is awesome and it's worked fantastically for my project so far!

    New feature 
    opened by xoob 23
  • Solr 7.4.0 Spellcheck

    Solr 7.4.0 Spellcheck

    I'm running solr 7.4.0 & spellcheck example but the code: $spellcheckResult = $resultset->getSpellcheck();

    $spellcheckResult is null! what shall i do?

    But localhost:8983/solr/testcore/spell?df=text&spellcheck.q=exampel&spellcheck=true has results as expected.

    what is the problem? any incompatibility between solariumphp and newest version of solr?

    There is a closed ticket on this issue already, but without a solution, so I re-post it.

    opened by samsmooth 22
  • Create and configure Managed Resources

    Create and configure Managed Resources

    I've added commands to create a Managed Resource and configure its initArgs through the REST API. Tests have been updated to include the new functionality.

    opened by thomascorthals 21
  • Update query broken when document contains single nested child documents

    Update query broken when document contains single nested child documents

    Solarium version(s) affected: 6.1.6 Solr version: 8.5.2

    Description

    Originally posted by @jupevi in https://github.com/solariumphp/solarium/issues/954#issuecomment-1095214385

    Pull request https://github.com/solariumphp/solarium/pull/954 broke update queries containing documents with single nested child documents (i.e. associative arrays), because it always treats arrays in field values as sequential and discards their keys.

    Relevant lines in the pull request: https://github.com/solariumphp/solarium/pull/954/files#diff-55c0919de6efccffaca331e4cd644e37dd4fd7deae7f17413e21b6320ab36fa3R251-R256

    Before this change, this payload worked fine:

    {
      "id": 1,
      "manufacturer": {
        "docType": "Manufacturer",
        "id": 2,
        "name": "Apple"
      }
    }
    

    After this change, the payload gets changed to the following before sending to Solr:

    {
      "id": 1,
      "manufacturer": [
        "Manufacturer",
        2,
        "Apple"
      ]
    }
    

    How to reproduce

    require __DIR__ . '/vendor/autoload.php';
    $data = json_decode('{
        "id": 1,
        "manufacturer": {
            "docType": "Manufacturer",
            "id": 2,
            "name": "Apple"
        }
    }', true);
    $doc = new \Solarium\QueryType\Update\Query\Document($data);
    var_dump($doc->getFields());
    

    Output:

    array(2) {
      ["id"]=>
      int(1)
      ["manufacturer"]=>
      array(3) {
        [0]=>
        string(12) "Manufacturer"
        [1]=>
        int(2)
        [2]=>
        string(5) "Apple"
      }
    }
    

    As you can see, the array keys have been discarded.

    Before version 6.1.6 the output was correct:

    array(2) {
      ["id"]=>
      int(1)
      ["manufacturer"]=>
      array(3) {
        ["docType"]=>
        string(12) "Manufacturer"
        ["id"]=>
        int(2)
        ["name"]=>
        string(5) "Apple"
      }
    }
    
    Bug Improvement 
    opened by jupevi 20
  • Enable Simple Group Format

    Enable Simple Group Format

    Currently you must use $groupComponent->setMainResult(true); in order to use the simple group format. This pull request allows the simple format to be used with out specifying the main result setting.

    Related to #260

    You can see the difference between the response types below.

    Solr Response with simple group format

    ?rows=2&q=*%3A*&wt=json&indent=true&group=true&group.field=STATE_CODE&group.format=simple&group.ngroups=true

    {
      "responseHeader":{
        "status":0,
        "QTime":33,
        "params":{
          "group.format":"simple",
          "group.ngroups":"true",
          "indent":"true",
          "q":"*:*",
          "group.field":"STATE_CODE",
          "group":"true",
          "wt":"json",
          "rows":"2"}},
      "grouped":{
        "STATE_CODE":{
          "matches":893638,
          "ngroups":65,
          "doclist":{"numFound":893638,"start":0,"docs":[
              {
                "ZIP_ID":"US:85332",
                "ZIP_CODE":"85332",
                "STATE_NAME":"Arizona",
                "CITY_NAME":"Congress",
                "COUNTRY_CODE":"US",
                "AREA_CODE":"928",
                "STATE_CODE":"AZ",
                "LONGITUDE":-112.8044,
                "LATLONG_1_COORDINATE":-112.8044,
                "COUNTRY_NAME":"United States",
                "LATITUDE":34.1734,
                "LATLONG_0_COORDINATE":34.1734,
                "_version_":1525713107556499456},
              {
                "ZIP_ID":"US:72670",
                "ZIP_CODE":"72670",
                "STATE_NAME":"Arkansas",
                "CITY_NAME":"Ponca",
                "COUNTRY_CODE":"US",
                "AREA_CODE":"870",
                "STATE_CODE":"AR",
                "LONGITUDE":-93.4014,
                "LATLONG_1_COORDINATE":-93.4014,
                "COUNTRY_NAME":"United States",
                "LATITUDE":36.0667,
                "LATLONG_0_COORDINATE":36.0667,
                "_version_":1525713107558596608}]
          }}}}
    

    Solr Response with group.main=true

    ?rows=2&q=*%3A*&wt=json&indent=true&group=true&group.field=STATE_CODE&group.format=simple&group.main=true&group.ngroups=true

    {
      "responseHeader":{
        "status":0,
        "QTime":60,
        "params":{
          "group.format":"simple",
          "group.ngroups":"true",
          "indent":"true",
          "q":"*:*",
          "group.field":"STATE_CODE",
          "group.main":"true",
          "group":"true",
          "wt":"json",
          "rows":"2"}},
      "response":{"numFound":893638,"start":0,"docs":[
          {
            "ZIP_ID":"US:85332",
            "ZIP_CODE":"85332",
            "STATE_NAME":"Arizona",
            "CITY_NAME":"Congress",
            "COUNTRY_CODE":"US",
            "AREA_CODE":"928",
            "STATE_CODE":"AZ",
            "LONGITUDE":-112.8044,
            "LATLONG_1_COORDINATE":-112.8044,
            "COUNTRY_NAME":"United States",
            "LATITUDE":34.1734,
            "LATLONG_0_COORDINATE":34.1734,
            "_version_":1525713107556499456},
          {
            "ZIP_ID":"US:72670",
            "ZIP_CODE":"72670",
            "STATE_NAME":"Arkansas",
            "CITY_NAME":"Ponca",
            "COUNTRY_CODE":"US",
            "AREA_CODE":"870",
            "STATE_CODE":"AR",
            "LONGITUDE":-93.4014,
            "LATLONG_1_COORDINATE":-93.4014,
            "COUNTRY_NAME":"United States",
            "LATITUDE":36.0667,
            "LATLONG_0_COORDINATE":36.0667,
            "_version_":1525713107558596608}]
      }}
    
    opened by chadicus 20
  • Since 6.2.5, missing required field id when indexing an empty array

    Since 6.2.5, missing required field id when indexing an empty array

    Solarium version(s) affected: 6.2.5 Solr version: 8.11

    Description

    Solr complains about missing id field but this field is present in every Document. This issue started to occur after upgrading to solarium 6.2.5. This is issue does not occur on 6.2.4:

    Solr HTTP error: OK (400)                                          
      {                                                                  
        "responseHeader":{                                               
          "status":400,                                                  
          "QTime":1},                                                    
        "error":{                                                        
          "metadata":[                                                   
            "error-class","org.apache.solr.common.SolrException",        
            "root-error-class","org.apache.solr.common.SolrException"],  
          "msg":"[doc=null] missing required field: id",                 
          "code":400}}      
    

    How to reproduce

    A simple test to reproduce is to try to index an empty array field:

    // get an update query instance
    $update = $client->createUpdate();
    $doc1 = $update->createDocument();
    $doc1->id = 123;
    $doc1->name = 'testdoc';
    $doc1->price = 364;
    $doc1->setField('collection_txt', [
                        0 => 'line 1',
                        1 => 'line 2',
                        2 => 'line 3',
    ]);
    $doc1->setField('tags_txt_en', []);
    $update->addDocument($doc1);
    $update->addCommit();
    $result = $client->update($update);
    

    Here a dump of an update Query containing 2 documents to add to Solr, these 2 docs contain id field.

    Solarium\QueryType\Update\Query\Query^ {#13746
      #options: array:4 [
        "handler" => "update"
        "resultclass" => "Solarium\QueryType\Update\Result"
        "documentclass" => "Solarium\QueryType\Update\Query\Document"
        "omitheader" => false
      ]
      #helper: null
      #params: []
      -localParameters: null
      #commandTypes: array:6 [
        "add" => "Solarium\QueryType\Update\Query\Command\Add"
        "commit" => "Solarium\QueryType\Update\Query\Command\Commit"
        "delete" => "Solarium\QueryType\Update\Query\Command\Delete"
        "optimize" => "Solarium\QueryType\Update\Query\Command\Optimize"
        "rawxml" => "Solarium\QueryType\Update\Query\Command\RawXml"
        "rollback" => "Solarium\QueryType\Update\Query\Command\Rollback"
      ]
      #commands: array:1 [
        0 => Solarium\QueryType\Update\Query\Command\Add^ {#449
          #options: []
          #documents: array:2 [
            0 => Solarium\QueryType\Update\Query\Document^ {#473
              #fields: array:19 [
                "id" => "62d911ce3144d1.02715591"
                "document_type_s" => "DocumentTranslation"
                "document_translation_id_i" => 1
                "document_id_i" => 1
                "created_at_dt" => "2021-09-17T10:19:59Z"
                "updated_at_dt" => "2022-06-23T14:00:35Z"
                "copyright_valid_since_dt" => "2022-06-15T19:00:00Z"
                "copyright_valid_until_dt" => "9999-12-31T22:59:59Z"
                "filename_s" => "2v3wckaloli_photo_1631298338669_7921e0c25422_crop_entropy_cs_srgb_fm_jpg_ixid_mnwyndmyodj8mhwxfhjhbmrvbxx8fhx8fhx8fde2mze4nzm5otk_ixlib_rb_1.2.1_q_85.jpg"
                "mime_type_s" => "image/jpeg"
                "locale_s" => "en"
                "title" => ""
                "title_txt_en" => ""
                "description_txt_en" => "city skyline during night time"
                "copyright_txt_en" => "Jeanson Wong, Unsplash"
                "tags_txt" => []
                "tags_txt_en" => ""
                "collection_txt" => array:3 [
                  0 => ""
                  1 => "city skyline during night time"
                  2 => "Jeanson Wong, Unsplash"
                ]
                "collection_txt_en" => """
                  \n
                  city skyline during night time\n
                  Jeanson Wong, Unsplash
                  """
              ]
              #boost: null
              #modifiers: []
              #key: "id"
              #fieldBoosts: []
              #version: null
            }
            1 => Solarium\QueryType\Update\Query\Document^ {#457
              #fields: array:19 [
                "id" => "62d911ce3801f8.35434180"
                "document_type_s" => "DocumentTranslation"
                "document_translation_id_i" => 2
                "document_id_i" => 1
                "created_at_dt" => "2021-09-17T10:19:59Z"
                "updated_at_dt" => "2022-06-23T14:00:35Z"
                "copyright_valid_since_dt" => "2022-06-15T19:00:00Z"
                "copyright_valid_until_dt" => "9999-12-31T22:59:59Z"
                "filename_s" => "2v3wckaloli_photo_1631298338669_7921e0c25422_crop_entropy_cs_srgb_fm_jpg_ixid_mnwyndmyodj8mhwxfhjhbmrvbxx8fhx8fhx8fde2mze4nzm5otk_ixlib_rb_1.2.1_q_85.jpg"
                "mime_type_s" => "image/jpeg"
                "locale_s" => "fr"
                "title" => ""
                "title_txt_fr" => ""
                "description_txt_fr" => "city skyline during night time"
                "copyright_txt_fr" => "Jeanson Wong, Unsplash"
                "tags_txt" => []
                "tags_txt_fr" => ""
                "collection_txt" => array:3 [
                  0 => ""
                  1 => "city skyline during night time"
                  2 => "Jeanson Wong, Unsplash"
                ]
                "collection_txt_fr" => """
                  \n
                  city skyline during night time\n
                  Jeanson Wong, Unsplash
                  """
              ]
              #boost: null
              #modifiers: []
              #key: "id"
              #fieldBoosts: []
              #version: null
            }
          ]
        }
      ]
    }
    

    Solr returns error at Query update: missing required field id

      Solr HTTP error: OK (400)                                          
      {                                                                  
        "responseHeader":{                                               
          "status":400,                                                  
          "QTime":1},                                                    
        "error":{                                                        
          "metadata":[                                                   
            "error-class","org.apache.solr.common.SolrException",        
            "root-error-class","org.apache.solr.common.SolrException"],  
          "msg":"[doc=null] missing required field: id",                 
          "code":400}} 
    

    Possible Solution
    Fallback to v6.2.4 fixes this problem

    Bug 
    opened by ambroisemaupate 17
  • Query builder

    Query builder

    helper class to help writing and maintaining (filter) queries; replaces https://github.com/solariumphp/solarium/pull/733

    i had a look at the SearchApiSolrBackend::createFilterQuery method but concluded that the main difference between that class and this helper class is that the createFilterQuery method does a lot of "filling in the blanks" based on field types which is information not available in this class.

    i did however add the Comparison::EMPTY constant and method to cover the edge case mentioned there twice for someone willing to query empty values. to keep things clean and simple, i've added a new comparison method rather than trying to incorporate it in others based on values passed.

    also the addition two simple integrations in the query class Query::setQueryFromQueryBuilder and Query::addFilterQueriesFromQueryBuilder.

    opened by wickedOne 8
  • solr api v2 manager

    solr api v2 manager

    following https://github.com/solariumphp/solarium/issues/753#issuecomment-586569921 i wrote a solr api v2 manager which i'm willing to share.

    it's nothing fancy, a manager class with a couple of interfaces easing the usage of the various solr v2 api endpoints. i personally use it for both the schema and config api for which i can provide the definitions as well.

    do you think that would be a useful contribution?

    opened by wickedOne 1
  • How to get the most relevant terms for a specific document?

    How to get the most relevant terms for a specific document?

    Hi,

    Is there a way to get the most important/relevant terms (i.e., terms with the highest TF/IDF score) for a specific document?

    I think this is possible with Lucene in some way: https://stackoverflow.com/questions/38976466/get-n-terms-with-top-tfidf-scores-for-each-documents-in-lucene-pylucene

    opened by MustafaKarabulut 3
  • Metrics API

    Metrics API

    There does not appear to be direct support for Solr's Metrics API.

    • Any past or present interest in this?
    • URI/handler is admin/metrics: Would the recommended implementation be that the relevant code exist in the Solarium\QueryType\Metrics namespace, and related constant be Client::QUERY_METRICS?

    Thoughts? TY!

    New feature 
    opened by bmeynell 3
  • BufferedAdd with many documents slowly increases flush cycle time

    BufferedAdd with many documents slowly increases flush cycle time

    I'm using the BufferedAdd plugin to index my documents. In some instances, I'll need to index tens of millions of documents. While testing, I set my buffer size to 30,000. I noticed that when my indexing process begins, the flushing those 30K documents takes about a second. After a couple million documents, that cycle takes a little longer (~1 second more). This goes on and on, and at around 10 or 11 million documents that have been indexed, I'm up to like 11 seconds between cycles. Is there something that Solarium is holding onto or writing to that would be slowing this down? I should add that this happens regardless of whether the Solr index is empty or whether it's already populated with millions of other documents.

    opened by rms2219 10
Releases(6.2.8)
  • 6.2.8(Dec 6, 2022)

    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

    • RequestBuilders must set a Content-Type on the Request for POST and PUT requests. Adapters 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() 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.

    Source code(tar.gz)
    Source code(zip)
  • 6.2.7(Sep 12, 2022)

    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

    • RequestBuilders must set a Content-Type on the Request for POST and PUT requests. Adapters 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() 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.

    Source code(tar.gz)
    Source code(zip)
  • 6.2.6(Jul 22, 2022)

    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() 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.

    Source code(tar.gz)
    Source code(zip)
  • 6.2.5(Jul 20, 2022)

    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.

    Source code(tar.gz)
    Source code(zip)
  • 6.2.4(Jun 30, 2022)

    Changes since 6.2.3

    Added

    • Symfony 6 support
    • Solr 9 support
    • Unified Highlighter support + improved support for other highlighters

    Fixed

    • Solarium\QueryType\Server\Collections\Query\Action\ClusterStatus::getRoute() always returned NULL even if a route was set
    • Solarium\Component\Highlighting\Highlighting::setMethod() didn't set the correct request parameter

    Changed

    • Solarium\QueryType\Select\Query\Query::setCursormark() and getCursormark() are now setCursorMark() and getCursorMark() with uppercase M
    • Managed resources execute GET requests for the Exists command by default to avoid SOLR-15116 and SOLR-16274. Set the 'useHeadRequest' option to true to execute HEAD requests instead.

    Removed

    • Solarium\QueryType\Stream\Expression, use Solarium\QueryType\Stream\ExpressionBuilder instead

    Changes since 6.2.2

    Added

    • Plugin\BufferedAddLite (BufferedAdd without event dispatching)
    • Plugin\BufferedDelete and Plugin\BufferedDeleteLite

    Fixed

    • Local parameter values are now escaped automatically when necessary

    Changes since 6.2.1

    Added

    • PHP 8.1 support

    Changes since 6.2.0

    Added

    • Possibility to set the context on an endpoint for SolrCloud instances with a non-default hostContext or Solr instances behind a reverse proxy, defaults to solr if omitted

    Changes since 6.1.6

    Added

    • Component\FacetSet::setOffset()
    • Component\FacetSet::setMethod() and Component\FacetSet::{METHOD_ENUM,METHOD_FC,METHOD_FCS,METHOD_UIF}
    • Component\FacetSet::setEnumCacheMinimumDocumentFrequency()
    • Component\FacetSet::setExists()
    • Component\FacetSet::setOverrequestCount()
    • Component\FacetSet::setOverrequestRatio()
    • Component\FacetSet::setThreads()
    • Component\FacetSet::setPivotMinCount() to set the global facet.pivot.mincount parameter
    • Component\Facet\Pivot::setPivotMinCount() to set the facet.pivot.mincount parameter for a specific pivot's fields
    • Component\Facet\Pivot::setOffset()
    • Component\Facet\Pivot::setSort()
    • Component\Facet\Pivot::setOverrequestCount()
    • Component\Facet\Pivot::setOverrequestRatio()
    • Component\Facet\Field::METHOD_FCS for per-segment field faceting for single-valued string fields
    • Component\Facet\Field::METHOD_UIF for UnInvertedField faceting
    • Component\Facet\Field::setEnumCacheMinimumDocumentFrequency()
    • Component\Facet\Field::setExists()
    • Component\Facet\Field::setOverrequestCount()
    • Component\Facet\Field::setOverrequestRatio()
    • Component\Facet\Field::setThreads()
    • Component\Facet\JsonTerms::{SORT_COUNT_ASC,SORT_COUNT_DESC,SORT_INDEX_ASC,SORT_INDEX_DESC}
    • Component\Facet\JsonTerms::setOverRefine()
    • Component\Facet\JsonTerms::setPrelimSort()

    Fixed

    • Component\Facet\Pivot::setLimit() now sets the correct query parameter
    • Component\Facet\JsonTerms::setSort() PHPDoc

    Deprecated

    • Component\Facet\Pivot::setMinCount(), use Component\FacetSet::setPivotMinCount() or Component\Facet\Pivot::setPivotMinCount() instead
    • Component\Facet\JsonTerms::SORT_COUNT, use SORT_COUNT_ASC or SORT_COUNT_DESC instead
    • Component\Facet\JsonTerms::SORT_INDEX, use SORT_INDEX_ASC or SORT_INDEX_DESC instead

    Changes since 6.1.5

    Added

    • PHP 8.1 support
    • QueryType\Update\Query\Document::setFields() to set all fields on a Document

    Fixed

    • Always respect automatic filtering of control characters in field values in QueryType\Update\Query\Document
    • Remove the field modifier along with the value(s) and boost in QueryType\Update\Query\Document::removeField()
    • Allow string to be returned for min, max and mean statistics in Component\Result\Stats\ResultTrait

    Changes since 6.1.4

    Added

    • Component\Result\Stats\Result::getDistinctValues()
    • Component\Result\Stats\Result::getCountDistinct()
    • Component\Result\Stats\Result::getCardinality()
    • Component\Result\Stats\FacetValue::getPercentiles()
    • Component\Result\Stats\FacetValue::getDistinctValues()
    • Component\Result\Stats\FacetValue::getCountDistinct()
    • Component\Result\Stats\FacetValue::getCardinality()
    • Component\Result\Stats\FacetValue::getStatValue()
    • Plugin PostBigExtractRequest
    • Support for Configset API
    • Set connection timeout on cURL adapter

    Fixed

    • Component\Result\Stats\Result::getPercentiles() returns percentiles as an associative array

    Changed

    • Component\Result\Stats\Result::getMean() returns NAN instead of 'NaN' if mean is NaN

    • Component\Result\Stats\FacetValue::getMean() returns NAN instead of 'NaN' if mean is NaN

    • Component\Result\Stats\Result::getValue() is renamed to getStatValue()

      Deprecated

    • Component\Result\Stats\FacetValue::getFacets()

    • Component\Result\Stats\Result::getValue()

    Changes since 6.1.3

    Added

    • Solarium\QueryType\ManagedResources\Result\Command::getWasSuccessful()
    • Solarium\QueryType\ManagedResources\Result\Command::getStatusMessage()
    • Query a single term in a Managed Resource

    Fixed

    • Syntax error in request with facet queries that contain local parameters
    • HEAD requests could lead to timeouts with cURL adapter
    • Fix for reserved characters in managed resources (SOLR-6853)
    • Parsing nested details in debug response

    Changed

    • Solarium\Component/Result/Stats/Result::getValue() is now public

    Changes since 6.1.2

    Fixed

    • possible exception in Debug\Detail::__toString() when sub details are missing

    Changes since 6.1.1

    Added

    • MoreLikeThis::setMaximumDocumentFrequency()
    • MoreLikeThis::setMaximumDocumentFrequencyPercentage()
    • getInterestingTerms() of MoreLikeThis Component results

    Fixed

    • Debug\Detail return value types
    • Debug\Document return value types

    Deprecated

    • Support for mlt.match.include and mlt.match.offset in MoreLikeThis Component (they only work in MLT queries)

    Changes since 6.1.0

    Fixed

    • Set Client::VERSION to '6.1.1'. Release 6.1.0 accidentally declared itself as 6.0.4.

    Changes since 6.0.4

    Added

    • Indexing labelled nested child documents through pseudo-fields
    • Extract query now supports extractFormat
    • Helper::rangeQuery() now supports left-inclusive only and right-inclusive only queries

    Fixed

    • PrefetchIterator::key() should return 0 instead of NULL on a fresh PrefetchIterator
    • PrefetchIterator::next() shouldn't skip fetched results after PrefetchIterator::count() on a fresh PrefetchIterator
    • PrefetchIterator::rewind() no longer results in duplicate documents when invoked mid-set
    • Fixed incorrect median function
    • Fix for maxScore being returned as "NaN" when group.query doesn't match any docs (SOLR-13839)

    Changed

    • Exception message for invalid/unavailable file in Extract query now contains filename
    • Helper::rangeQuery() detects point values without parameter to turn off escaping

    Removed

    • PHP 7.2 support

    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.

    Source code(tar.gz)
    Source code(zip)
  • 6.2.3(Jan 31, 2022)

    6.2.3

    Changes since 6.2.2

    Added

    • Plugin\BufferedAddLite (BufferedAdd without event dispatching)
    • Plugin\BufferedDelete and Plugin\BufferedDeleteLite

    Fixed

    • Local parameter values are now escaped automatically when necessary

    Changes since 6.2.1

    Added

    • PHP 8.1 support

    Changes since 6.2.0

    Added

    • Possibility to set the context on an endpoint for SolrCloud instances with a non-default hostContext or Solr instances behind a reverse proxy, defaults to solr if omitted

    Changes since 6.1.6

    Added

    • Component\FacetSet::setOffset()
    • Component\FacetSet::setMethod() and Component\FacetSet::{METHOD_ENUM,METHOD_FC,METHOD_FCS,METHOD_UIF}
    • Component\FacetSet::setEnumCacheMinimumDocumentFrequency()
    • Component\FacetSet::setExists()
    • Component\FacetSet::setOverrequestCount()
    • Component\FacetSet::setOverrequestRatio()
    • Component\FacetSet::setThreads()
    • Component\FacetSet::setPivotMinCount() to set the global facet.pivot.mincount parameter
    • Component\Facet\Pivot::setPivotMinCount() to set the facet.pivot.mincount parameter for a specific pivot's fields
    • Component\Facet\Pivot::setOffset()
    • Component\Facet\Pivot::setSort()
    • Component\Facet\Pivot::setOverrequestCount()
    • Component\Facet\Pivot::setOverrequestRatio()
    • Component\Facet\Field::METHOD_FCS for per-segment field faceting for single-valued string fields
    • Component\Facet\Field::METHOD_UIF for UnInvertedField faceting
    • Component\Facet\Field::setEnumCacheMinimumDocumentFrequency()
    • Component\Facet\Field::setExists()
    • Component\Facet\Field::setOverrequestCount()
    • Component\Facet\Field::setOverrequestRatio()
    • Component\Facet\Field::setThreads()
    • Component\Facet\JsonTerms::{SORT_COUNT_ASC,SORT_COUNT_DESC,SORT_INDEX_ASC,SORT_INDEX_DESC}
    • Component\Facet\JsonTerms::setOverRefine()
    • Component\Facet\JsonTerms::setPrelimSort()

    Fixed

    • Component\Facet\Pivot::setLimit() now sets the correct query parameter
    • Component\Facet\JsonTerms::setSort() PHPDoc

    Deprecated

    • Component\Facet\Pivot::setMinCount(), use Component\FacetSet::setPivotMinCount() or Component\Facet\Pivot::setPivotMinCount() instead
    • Component\Facet\JsonTerms::SORT_COUNT, use SORT_COUNT_ASC or SORT_COUNT_DESC instead
    • Component\Facet\JsonTerms::SORT_INDEX, use SORT_INDEX_ASC or SORT_INDEX_DESC instead

    Changes since 6.1.5

    Added

    • PHP 8.1 support
    • QueryType\Update\Query\Document::setFields() to set all fields on a Document

    Fixed

    • Always respect automatic filtering of control characters in field values in QueryType\Update\Query\Document
    • Remove the field modifier along with the value(s) and boost in QueryType\Update\Query\Document::removeField()
    • Allow string to be returned for min, max and mean statistics in Component\Result\Stats\ResultTrait

    Changes since 6.1.4

    Added

    • Component\Result\Stats\Result::getDistinctValues()
    • Component\Result\Stats\Result::getCountDistinct()
    • Component\Result\Stats\Result::getCardinality()
    • Component\Result\Stats\FacetValue::getPercentiles()
    • Component\Result\Stats\FacetValue::getDistinctValues()
    • Component\Result\Stats\FacetValue::getCountDistinct()
    • Component\Result\Stats\FacetValue::getCardinality()
    • Component\Result\Stats\FacetValue::getStatValue()
    • Plugin PostBigExtractRequest
    • Support for Configset API
    • Set connection timeout on cURL adapter

    Fixed

    • Component\Result\Stats\Result::getPercentiles() returns percentiles as an associative array

    Changed

    • Component\Result\Stats\Result::getMean() returns NAN instead of 'NaN' if mean is NaN

    • Component\Result\Stats\FacetValue::getMean() returns NAN instead of 'NaN' if mean is NaN

    • Component\Result\Stats\Result::getValue() is renamed to getStatValue()

      Deprecated

    • Component\Result\Stats\FacetValue::getFacets()

    • Component\Result\Stats\Result::getValue()

    Changes since 6.1.3

    Added

    • Solarium\QueryType\ManagedResources\Result\Command::getWasSuccessful()
    • Solarium\QueryType\ManagedResources\Result\Command::getStatusMessage()
    • Query a single term in a Managed Resource

    Fixed

    • Syntax error in request with facet queries that contain local parameters
    • HEAD requests could lead to timeouts with cURL adapter
    • Fix for reserved characters in managed resources (SOLR-6853)
    • Parsing nested details in debug response

    Changed

    • Solarium\Component/Result/Stats/Result::getValue() is now public

    Changes since 6.1.2

    Fixed

    • possible exception in Debug\Detail::__toString() when sub details are missing

    Changes since 6.1.1

    Added

    • MoreLikeThis::setMaximumDocumentFrequency()
    • MoreLikeThis::setMaximumDocumentFrequencyPercentage()
    • getInterestingTerms() of MoreLikeThis Component results

    Fixed

    • Debug\Detail return value types
    • Debug\Document return value types

    Deprecated

    • Support for mlt.match.include and mlt.match.offset in MoreLikeThis Component (they only work in MLT queries)

    Changes since 6.1.0

    Fixed

    • Set Client::VERSION to '6.1.1'. Release 6.1.0 accidentally declared itself as 6.0.4.

    Changes since 6.0.4

    Added

    • Indexing labelled nested child documents through pseudo-fields
    • Extract query now supports extractFormat
    • Helper::rangeQuery() now supports left-inclusive only and right-inclusive only queries

    Fixed

    • PrefetchIterator::key() should return 0 instead of NULL on a fresh PrefetchIterator
    • PrefetchIterator::next() shouldn't skip fetched results after PrefetchIterator::count() on a fresh PrefetchIterator
    • PrefetchIterator::rewind() no longer results in duplicate documents when invoked mid-set
    • Fixed incorrect median function
    • Fix for maxScore being returned as "NaN" when group.query doesn't match any docs (SOLR-13839)

    Changed

    • Exception message for invalid/unavailable file in Extract query now contains filename
    • Helper::rangeQuery() detects point values without parameter to turn off escaping

    Removed

    • PHP 7.2 support

    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.

    Source code(tar.gz)
    Source code(zip)
  • 6.2.2(Jan 20, 2022)

    6.2.2

    Changes since 6.2.1

    Added

    • PHP 8.1 support

    Changes since 6.2.0

    Added

    • Possibility to set the context on an endpoint for SolrCloud instances with a non-default hostContext or Solr instances behind a reverse proxy, defaults to solr if omitted

    Changes since 6.1.6

    Added

    • Component\FacetSet::setOffset()
    • Component\FacetSet::setMethod() and Component\FacetSet::{METHOD_ENUM,METHOD_FC,METHOD_FCS,METHOD_UIF}
    • Component\FacetSet::setEnumCacheMinimumDocumentFrequency()
    • Component\FacetSet::setExists()
    • Component\FacetSet::setOverrequestCount()
    • Component\FacetSet::setOverrequestRatio()
    • Component\FacetSet::setThreads()
    • Component\FacetSet::setPivotMinCount() to set the global facet.pivot.mincount parameter
    • Component\Facet\Pivot::setPivotMinCount() to set the facet.pivot.mincount parameter for a specific pivot's fields
    • Component\Facet\Pivot::setOffset()
    • Component\Facet\Pivot::setSort()
    • Component\Facet\Pivot::setOverrequestCount()
    • Component\Facet\Pivot::setOverrequestRatio()
    • Component\Facet\Field::METHOD_FCS for per-segment field faceting for single-valued string fields
    • Component\Facet\Field::METHOD_UIF for UnInvertedField faceting
    • Component\Facet\Field::setEnumCacheMinimumDocumentFrequency()
    • Component\Facet\Field::setExists()
    • Component\Facet\Field::setOverrequestCount()
    • Component\Facet\Field::setOverrequestRatio()
    • Component\Facet\Field::setThreads()
    • Component\Facet\JsonTerms::{SORT_COUNT_ASC,SORT_COUNT_DESC,SORT_INDEX_ASC,SORT_INDEX_DESC}
    • Component\Facet\JsonTerms::setOverRefine()
    • Component\Facet\JsonTerms::setPrelimSort()

    Fixed

    • Component\Facet\Pivot::setLimit() now sets the correct query parameter
    • Component\Facet\JsonTerms::setSort() PHPDoc

    Deprecated

    • Component\Facet\Pivot::setMinCount(), use Component\FacetSet::setPivotMinCount() or Component\Facet\Pivot::setPivotMinCount() instead
    • Component\Facet\JsonTerms::SORT_COUNT, use SORT_COUNT_ASC or SORT_COUNT_DESC instead
    • Component\Facet\JsonTerms::SORT_INDEX, use SORT_INDEX_ASC or SORT_INDEX_DESC instead

    Changes since 6.1.5

    Added

    • PHP 8.1 support
    • QueryType\Update\Query\Document::setFields() to set all fields on a Document

    Fixed

    • Always respect automatic filtering of control characters in field values in QueryType\Update\Query\Document
    • Remove the field modifier along with the value(s) and boost in QueryType\Update\Query\Document::removeField()
    • Allow string to be returned for min, max and mean statistics in Component\Result\Stats\ResultTrait

    Changes since 6.1.4

    Added

    • Component\Result\Stats\Result::getDistinctValues()
    • Component\Result\Stats\Result::getCountDistinct()
    • Component\Result\Stats\Result::getCardinality()
    • Component\Result\Stats\FacetValue::getPercentiles()
    • Component\Result\Stats\FacetValue::getDistinctValues()
    • Component\Result\Stats\FacetValue::getCountDistinct()
    • Component\Result\Stats\FacetValue::getCardinality()
    • Component\Result\Stats\FacetValue::getStatValue()
    • Plugin PostBigExtractRequest
    • Support for Configset API
    • Set connection timeout on cURL adapter

    Fixed

    • Component\Result\Stats\Result::getPercentiles() returns percentiles as an associative array

    Changed

    • Component\Result\Stats\Result::getMean() returns NAN instead of 'NaN' if mean is NaN

    • Component\Result\Stats\FacetValue::getMean() returns NAN instead of 'NaN' if mean is NaN

    • Component\Result\Stats\Result::getValue() is renamed to getStatValue()

      Deprecated

    • Component\Result\Stats\FacetValue::getFacets()

    • Component\Result\Stats\Result::getValue()

    Changes since 6.1.3

    Added

    • Solarium\QueryType\ManagedResources\Result\Command::getWasSuccessful()
    • Solarium\QueryType\ManagedResources\Result\Command::getStatusMessage()
    • Query a single term in a Managed Resource

    Fixed

    • Syntax error in request with facet queries that contain local parameters
    • HEAD requests could lead to timeouts with cURL adapter
    • Fix for reserved characters in managed resources (SOLR-6853)
    • Parsing nested details in debug response

    Changed

    • Solarium\Component/Result/Stats/Result::getValue() is now public

    Changes since 6.1.2

    Fixed

    • possible exception in Debug\Detail::__toString() when sub details are missing

    Changes since 6.1.1

    Added

    • MoreLikeThis::setMaximumDocumentFrequency()
    • MoreLikeThis::setMaximumDocumentFrequencyPercentage()
    • getInterestingTerms() of MoreLikeThis Component results

    Fixed

    • Debug\Detail return value types
    • Debug\Document return value types

    Deprecated

    • Support for mlt.match.include and mlt.match.offset in MoreLikeThis Component (they only work in MLT queries)

    Changes since 6.1.0

    Fixed

    • Set Client::VERSION to '6.1.1'. Release 6.1.0 accidentally declared itself as 6.0.4.

    Changes since 6.0.4

    Added

    • Indexing labelled nested child documents through pseudo-fields
    • Extract query now supports extractFormat
    • Helper::rangeQuery() now supports left-inclusive only and right-inclusive only queries

    Fixed

    • PrefetchIterator::key() should return 0 instead of NULL on a fresh PrefetchIterator
    • PrefetchIterator::next() shouldn't skip fetched results after PrefetchIterator::count() on a fresh PrefetchIterator
    • PrefetchIterator::rewind() no longer results in duplicate documents when invoked mid-set
    • Fixed incorrect median function
    • Fix for maxScore being returned as "NaN" when group.query doesn't match any docs (SOLR-13839)

    Changed

    • Exception message for invalid/unavailable file in Extract query now contains filename
    • Helper::rangeQuery() detects point values without parameter to turn off escaping

    Removed

    • PHP 7.2 support

    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.

    Source code(tar.gz)
    Source code(zip)
  • 6.2.1(Dec 26, 2021)

    6.2.1

    Changes since 6.2.0

    Added

    • Possibility to set the context on an endpoint for SolrCloud instances with a non-default hostContext or Solr instances behind a reverse proxy, defaults to solr if omitted

    Changes since 6.1.6

    Added

    • Component\FacetSet::setOffset()
    • Component\FacetSet::setMethod() and Component\FacetSet::{METHOD_ENUM,METHOD_FC,METHOD_FCS,METHOD_UIF}
    • Component\FacetSet::setEnumCacheMinimumDocumentFrequency()
    • Component\FacetSet::setExists()
    • Component\FacetSet::setOverrequestCount()
    • Component\FacetSet::setOverrequestRatio()
    • Component\FacetSet::setThreads()
    • Component\FacetSet::setPivotMinCount() to set the global facet.pivot.mincount parameter
    • Component\Facet\Pivot::setPivotMinCount() to set the facet.pivot.mincount parameter for a specific pivot's fields
    • Component\Facet\Pivot::setOffset()
    • Component\Facet\Pivot::setSort()
    • Component\Facet\Pivot::setOverrequestCount()
    • Component\Facet\Pivot::setOverrequestRatio()
    • Component\Facet\Field::METHOD_FCS for per-segment field faceting for single-valued string fields
    • Component\Facet\Field::METHOD_UIF for UnInvertedField faceting
    • Component\Facet\Field::setEnumCacheMinimumDocumentFrequency()
    • Component\Facet\Field::setExists()
    • Component\Facet\Field::setOverrequestCount()
    • Component\Facet\Field::setOverrequestRatio()
    • Component\Facet\Field::setThreads()
    • Component\Facet\JsonTerms::{SORT_COUNT_ASC,SORT_COUNT_DESC,SORT_INDEX_ASC,SORT_INDEX_DESC}
    • Component\Facet\JsonTerms::setOverRefine()
    • Component\Facet\JsonTerms::setPrelimSort()

    Fixed

    • Component\Facet\Pivot::setLimit() now sets the correct query parameter
    • Component\Facet\JsonTerms::setSort() PHPDoc

    Deprecated

    • Component\Facet\Pivot::setMinCount(), use Component\FacetSet::setPivotMinCount() or Component\Facet\Pivot::setPivotMinCount() instead
    • Component\Facet\JsonTerms::SORT_COUNT, use SORT_COUNT_ASC or SORT_COUNT_DESC instead
    • Component\Facet\JsonTerms::SORT_INDEX, use SORT_INDEX_ASC or SORT_INDEX_DESC instead

    Changes since 6.1.5

    Added

    • PHP 8.1 support
    • QueryType\Update\Query\Document::setFields() to set all fields on a Document

    Fixed

    • Always respect automatic filtering of control characters in field values in QueryType\Update\Query\Document
    • Remove the field modifier along with the value(s) and boost in QueryType\Update\Query\Document::removeField()
    • Allow string to be returned for min, max and mean statistics in Component\Result\Stats\ResultTrait

    Changes since 6.1.4

    Added

    • Component\Result\Stats\Result::getDistinctValues()
    • Component\Result\Stats\Result::getCountDistinct()
    • Component\Result\Stats\Result::getCardinality()
    • Component\Result\Stats\FacetValue::getPercentiles()
    • Component\Result\Stats\FacetValue::getDistinctValues()
    • Component\Result\Stats\FacetValue::getCountDistinct()
    • Component\Result\Stats\FacetValue::getCardinality()
    • Component\Result\Stats\FacetValue::getStatValue()
    • Plugin PostBigExtractRequest
    • Support for Configset API
    • Set connection timeout on cURL adapter

    Fixed

    • Component\Result\Stats\Result::getPercentiles() returns percentiles as an associative array

    Changed

    • Component\Result\Stats\Result::getMean() returns NAN instead of 'NaN' if mean is NaN

    • Component\Result\Stats\FacetValue::getMean() returns NAN instead of 'NaN' if mean is NaN

    • Component\Result\Stats\Result::getValue() is renamed to getStatValue()

      Deprecated

    • Component\Result\Stats\FacetValue::getFacets()

    • Component\Result\Stats\Result::getValue()

    Changes since 6.1.3

    Added

    • Solarium\QueryType\ManagedResources\Result\Command::getWasSuccessful()
    • Solarium\QueryType\ManagedResources\Result\Command::getStatusMessage()
    • Query a single term in a Managed Resource

    Fixed

    • Syntax error in request with facet queries that contain local parameters
    • HEAD requests could lead to timeouts with cURL adapter
    • Fix for reserved characters in managed resources (SOLR-6853)
    • Parsing nested details in debug response

    Changed

    • Solarium\Component/Result/Stats/Result::getValue() is now public

    Changes since 6.1.2

    Fixed

    • possible exception in Debug\Detail::__toString() when sub details are missing

    Changes since 6.1.1

    Added

    • MoreLikeThis::setMaximumDocumentFrequency()
    • MoreLikeThis::setMaximumDocumentFrequencyPercentage()
    • getInterestingTerms() of MoreLikeThis Component results

    Fixed

    • Debug\Detail return value types
    • Debug\Document return value types

    Deprecated

    • Support for mlt.match.include and mlt.match.offset in MoreLikeThis Component (they only work in MLT queries)

    Changes since 6.1.0

    Fixed

    • Set Client::VERSION to '6.1.1'. Release 6.1.0 accidentally declared itself as 6.0.4.

    Changes since 6.0.4

    Added

    • Indexing labelled nested child documents through pseudo-fields
    • Extract query now supports extractFormat
    • Helper::rangeQuery() now supports left-inclusive only and right-inclusive only queries

    Fixed

    • PrefetchIterator::key() should return 0 instead of NULL on a fresh PrefetchIterator
    • PrefetchIterator::next() shouldn't skip fetched results after PrefetchIterator::count() on a fresh PrefetchIterator
    • PrefetchIterator::rewind() no longer results in duplicate documents when invoked mid-set
    • Fixed incorrect median function
    • Fix for maxScore being returned as "NaN" when group.query doesn't match any docs (SOLR-13839)

    Changed

    • Exception message for invalid/unavailable file in Extract query now contains filename
    • Helper::rangeQuery() detects point values without parameter to turn off escaping

    Removed

    • PHP 7.2 support

    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.

    Source code(tar.gz)
    Source code(zip)
  • 6.2.0(Dec 22, 2021)

    6.2.0

    Changes since 6.1.6

    Added

    • Component\FacetSet::setOffset()
    • Component\FacetSet::setMethod() and Component\FacetSet::{METHOD_ENUM,METHOD_FC,METHOD_FCS,METHOD_UIF}
    • Component\FacetSet::setEnumCacheMinimumDocumentFrequency()
    • Component\FacetSet::setExists()
    • Component\FacetSet::setOverrequestCount()
    • Component\FacetSet::setOverrequestRatio()
    • Component\FacetSet::setThreads()
    • Component\FacetSet::setPivotMinCount() to set the global facet.pivot.mincount parameter
    • Component\Facet\Pivot::setPivotMinCount() to set the facet.pivot.mincount parameter for a specific pivot's fields
    • Component\Facet\Pivot::setOffset()
    • Component\Facet\Pivot::setSort()
    • Component\Facet\Pivot::setOverrequestCount()
    • Component\Facet\Pivot::setOverrequestRatio()
    • Component\Facet\Field::METHOD_FCS for per-segment field faceting for single-valued string fields
    • Component\Facet\Field::METHOD_UIF for UnInvertedField faceting
    • Component\Facet\Field::setEnumCacheMinimumDocumentFrequency()
    • Component\Facet\Field::setExists()
    • Component\Facet\Field::setOverrequestCount()
    • Component\Facet\Field::setOverrequestRatio()
    • Component\Facet\Field::setThreads()
    • Component\Facet\JsonTerms::{SORT_COUNT_ASC,SORT_COUNT_DESC,SORT_INDEX_ASC,SORT_INDEX_DESC}
    • Component\Facet\JsonTerms::setOverRefine()
    • Component\Facet\JsonTerms::setPrelimSort()

    Fixed

    • Component\Facet\Pivot::setLimit() now sets the correct query parameter
    • Component\Facet\JsonTerms::setSort() PHPDoc

    Deprecated

    • Component\Facet\Pivot::setMinCount(), use Component\FacetSet::setPivotMinCount() or Component\Facet\Pivot::setPivotMinCount() instead
    • Component\Facet\JsonTerms::SORT_COUNT, use SORT_COUNT_ASC or SORT_COUNT_DESC instead
    • Component\Facet\JsonTerms::SORT_INDEX, use SORT_INDEX_ASC or SORT_INDEX_DESC instead

    Changes since 6.1.5

    Added

    • PHP 8.1 support
    • QueryType\Update\Query\Document::setFields() to set all fields on a Document

    Fixed

    • Always respect automatic filtering of control characters in field values in QueryType\Update\Query\Document
    • Remove the field modifier along with the value(s) and boost in QueryType\Update\Query\Document::removeField()
    • Allow string to be returned for min, max and mean statistics in Component\Result\Stats\ResultTrait

    Changes since 6.1.4

    Added

    • Component\Result\Stats\Result::getDistinctValues()
    • Component\Result\Stats\Result::getCountDistinct()
    • Component\Result\Stats\Result::getCardinality()
    • Component\Result\Stats\FacetValue::getPercentiles()
    • Component\Result\Stats\FacetValue::getDistinctValues()
    • Component\Result\Stats\FacetValue::getCountDistinct()
    • Component\Result\Stats\FacetValue::getCardinality()
    • Component\Result\Stats\FacetValue::getStatValue()
    • Plugin PostBigExtractRequest
    • Support for Configset API
    • Set connection timeout on cURL adapter

    Fixed

    • Component\Result\Stats\Result::getPercentiles() returns percentiles as an associative array

    Changed

    • Component\Result\Stats\Result::getMean() returns NAN instead of 'NaN' if mean is NaN

    • Component\Result\Stats\FacetValue::getMean() returns NAN instead of 'NaN' if mean is NaN

    • Component\Result\Stats\Result::getValue() is renamed to getStatValue()

      Deprecated

    • Component\Result\Stats\FacetValue::getFacets()

    • Component\Result\Stats\Result::getValue()

    Changes since 6.1.3

    Added

    • Solarium\QueryType\ManagedResources\Result\Command::getWasSuccessful()
    • Solarium\QueryType\ManagedResources\Result\Command::getStatusMessage()
    • Query a single term in a Managed Resource

    Fixed

    • Syntax error in request with facet queries that contain local parameters
    • HEAD requests could lead to timeouts with cURL adapter
    • Fix for reserved characters in managed resources (SOLR-6853)
    • Parsing nested details in debug response

    Changed

    • Solarium\Component/Result/Stats/Result::getValue() is now public

    Changes since 6.1.2

    Fixed

    • possible exception in Debug\Detail::__toString() when sub details are missing

    Changes since 6.1.1

    Added

    • MoreLikeThis::setMaximumDocumentFrequency()
    • MoreLikeThis::setMaximumDocumentFrequencyPercentage()
    • getInterestingTerms() of MoreLikeThis Component results

    Fixed

    • Debug\Detail return value types
    • Debug\Document return value types

    Deprecated

    • Support for mlt.match.include and mlt.match.offset in MoreLikeThis Component (they only work in MLT queries)

    Changes since 6.1.0

    Fixed

    • Set Client::VERSION to '6.1.1'. Release 6.1.0 accidentally declared itself as 6.0.4.

    Changes since 6.0.4

    Added

    • Indexing labelled nested child documents through pseudo-fields
    • Extract query now supports extractFormat
    • Helper::rangeQuery() now supports left-inclusive only and right-inclusive only queries

    Fixed

    • PrefetchIterator::key() should return 0 instead of NULL on a fresh PrefetchIterator
    • PrefetchIterator::next() shouldn't skip fetched results after PrefetchIterator::count() on a fresh PrefetchIterator
    • PrefetchIterator::rewind() no longer results in duplicate documents when invoked mid-set
    • Fixed incorrect median function
    • Fix for maxScore being returned as "NaN" when group.query doesn't match any docs (SOLR-13839)

    Changed

    • Exception message for invalid/unavailable file in Extract query now contains filename
    • Helper::rangeQuery() detects point values without parameter to turn off escaping

    Removed

    • PHP 7.2 support

    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',
    
    Source code(tar.gz)
    Source code(zip)
  • 6.1.6(Nov 8, 2021)

    6.1.6

    Changes since 6.1.5

    Added

    • PHP 8.1 support
    • QueryType\Update\Query\Document::setFields() to set all fields on a Document

    Fixed

    • Always respect automatic filtering of control characters in field values in QueryType\Update\Query\Document
    • Remove the field modifier along with the value(s) and boost in QueryType\Update\Query\Document::removeField()
    • Allow string to be returned for min, max and mean statistics in Component\Result\Stats\ResultTrait

    Changes since 6.1.4

    Added

    • Component\Result\Stats\Result::getDistinctValues()
    • Component\Result\Stats\Result::getCountDistinct()
    • Component\Result\Stats\Result::getCardinality()
    • Component\Result\Stats\FacetValue::getPercentiles()
    • Component\Result\Stats\FacetValue::getDistinctValues()
    • Component\Result\Stats\FacetValue::getCountDistinct()
    • Component\Result\Stats\FacetValue::getCardinality()
    • Component\Result\Stats\FacetValue::getStatValue()
    • Plugin PostBigExtractRequest
    • Support for Configset API
    • Set connection timeout on cURL adapter

    Fixed

    • Component\Result\Stats\Result::getPercentiles() returns percentiles as an associative array

    Changed

    • Component\Result\Stats\Result::getMean() returns NAN instead of 'NaN' if mean is NaN

    • Component\Result\Stats\FacetValue::getMean() returns NAN instead of 'NaN' if mean is NaN

    • Component\Result\Stats\Result::getValue() is renamed to getStatValue()

      Deprecated

    • Component\Result\Stats\FacetValue::getFacets()

    • Component\Result\Stats\Result::getValue()

    Changes since 6.1.3

    Added

    • Solarium\QueryType\ManagedResources\Result\Command::getWasSuccessful()
    • Solarium\QueryType\ManagedResources\Result\Command::getStatusMessage()
    • Query a single term in a Managed Resource

    Fixed

    • Syntax error in request with facet queries that contain local parameters
    • HEAD requests could lead to timeouts with cURL adapter
    • Fix for reserved characters in managed resources (SOLR-6853)
    • Parsing nested details in debug response

    Changed

    • Solarium\Component/Result/Stats/Result::getValue() is now public

    Changes since 6.1.2

    Fixed

    • possible exception in Debug\Detail::__toString() when sub details are missing

    Changes since 6.1.1

    Added

    • MoreLikeThis::setMaximumDocumentFrequency()
    • MoreLikeThis::setMaximumDocumentFrequencyPercentage()
    • getInterestingTerms() of MoreLikeThis Component results

    Fixed

    • Debug\Detail return value types
    • Debug\Document return value types

    Deprecated

    • Support for mlt.match.include and mlt.match.offset in MoreLikeThis Component (they only work in MLT queries)

    Changes since 6.1.0

    Fixed

    • Set Client::VERSION to '6.1.1'. Release 6.1.0 accidentally declared itself as 6.0.4.

    Changes since 6.0.4

    Added

    • Indexing labelled nested child documents through pseudo-fields
    • Extract query now supports extractFormat
    • Helper::rangeQuery() now supports left-inclusive only and right-inclusive only queries

    Fixed

    • PrefetchIterator::key() should return 0 instead of NULL on a fresh PrefetchIterator
    • PrefetchIterator::next() shouldn't skip fetched results after PrefetchIterator::count() on a fresh PrefetchIterator
    • PrefetchIterator::rewind() no longer results in duplicate documents when invoked mid-set
    • Fixed incorrect median function
    • Fix for maxScore being returned as "NaN" when group.query doesn't match any docs (SOLR-13839)

    Changed

    • Exception message for invalid/unavailable file in Extract query now contains filename
    • Helper::rangeQuery() detects point values without parameter to turn off escaping

    Removed

    • PHP 7.2 support

    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',
    
    Source code(tar.gz)
    Source code(zip)
  • 6.1.5(Aug 12, 2021)

    6.1.5

    Changes since 6.1.4

    Added

    • Component\Result\Stats\Result::getDistinctValues()
    • Component\Result\Stats\Result::getCountDistinct()
    • Component\Result\Stats\Result::getCardinality()
    • Component\Result\Stats\FacetValue::getPercentiles()
    • Component\Result\Stats\FacetValue::getDistinctValues()
    • Component\Result\Stats\FacetValue::getCountDistinct()
    • Component\Result\Stats\FacetValue::getCardinality()
    • Component\Result\Stats\FacetValue::getStatValue()
    • Plugin PostBigExtractRequest
    • Support for Configset API
    • Set connection timeout on cURL adapter

    Fixed

    • Component\Result\Stats\Result::getPercentiles() returns percentiles as an associative array

    Changed

    • Component\Result\Stats\Result::getMean() returns NAN instead of 'NaN' if mean is NaN

    • Component\Result\Stats\FacetValue::getMean() returns NAN instead of 'NaN' if mean is NaN

    • Component\Result\Stats\Result::getValue() is renamed to getStatValue()

      Deprecated

    • Component\Result\Stats\FacetValue::getFacets()

    • Component\Result\Stats\Result::getValue()

    Changes since 6.1.3

    Added

    • Solarium\QueryType\ManagedResources\Result\Command::getWasSuccessful()
    • Solarium\QueryType\ManagedResources\Result\Command::getStatusMessage()
    • Query a single term in a Managed Resource

    Fixed

    • Syntax error in request with facet queries that contain local parameters
    • HEAD requests could lead to timeouts with cURL adapter
    • Fix for reserved characters in managed resources (SOLR-6853)
    • Parsing nested details in debug response

    Changed

    • Solarium\Component/Result/Stats/Result::getValue() is now public

    Changes since 6.1.2

    Fixed

    • possible exception in Debug\Detail::__toString() when sub details are missing

    Changes since 6.1.1

    Added

    • MoreLikeThis::setMaximumDocumentFrequency()
    • MoreLikeThis::setMaximumDocumentFrequencyPercentage()
    • getInterestingTerms() of MoreLikeThis Component results

    Fixed

    • Debug\Detail return value types
    • Debug\Document return value types

    Deprecated

    • Support for mlt.match.include and mlt.match.offset in MoreLikeThis Component (they only work in MLT queries)

    Changes since 6.1.0

    Fixed

    • Set Client::VERSION to '6.1.1'. Release 6.1.0 accidentally declared itself as 6.0.4.

    Changes since 6.0.4

    Added

    • Indexing labelled nested child documents through pseudo-fields
    • Extract query now supports extractFormat
    • Helper::rangeQuery() now supports left-inclusive only and right-inclusive only queries

    Fixed

    • PrefetchIterator::key() should return 0 instead of NULL on a fresh PrefetchIterator
    • PrefetchIterator::next() shouldn't skip fetched results after PrefetchIterator::count() on a fresh PrefetchIterator
    • PrefetchIterator::rewind() no longer results in duplicate documents when invoked mid-set
    • Fixed incorrect median function
    • Fix for maxScore being returned as "NaN" when group.query doesn't match any docs (SOLR-13839)

    Changed

    • Exception message for invalid/unavailable file in Extract query now contains filename
    • Helper::rangeQuery() detects point values without parameter to turn off escaping

    Removed

    • PHP 7.2 support

    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',
    
    Source code(tar.gz)
    Source code(zip)
  • 6.1.4(Jul 6, 2021)

    6.1.4

    Changes since 6.1.3

    Added

    • Solarium\QueryType\ManagedResources\Result\Command::getWasSuccessful()
    • Solarium\QueryType\ManagedResources\Result\Command::getStatusMessage()
    • Query a single term in a Managed Resource

    Fixed

    • Syntax error in request with facet queries that contain local parameters
    • HEAD requests could lead to timeouts with cURL adapter
    • Fix for reserved characters in managed resources (SOLR-6853)
    • Parsing nested details in debug response

    Changed

    • Solarium\Component/Result/Stats/Result::getValue() is now public

    Changes since 6.1.2

    Fixed

    • possible exception in Debug\Detail::__toString() when sub details are missing

    Changes since 6.1.1

    Added

    • MoreLikeThis::setMaximumDocumentFrequency()
    • MoreLikeThis::setMaximumDocumentFrequencyPercentage()
    • getInterestingTerms() of MoreLikeThis Component results

    Fixed

    • Debug\Detail return value types
    • Debug\Document return value types

    Deprecated

    • Support for mlt.match.include and mlt.match.offset in MoreLikeThis Component (they only work in MLT queries)

    Changes since 6.1.0

    Fixed

    • Set Client::VERSION to '6.1.1'. Release 6.1.0 accidentally declared itself as 6.0.4.

    Changes since 6.0.4

    Added

    • Indexing labelled nested child documents through pseudo-fields
    • Extract query now supports extractFormat
    • Helper::rangeQuery() now supports left-inclusive only and right-inclusive only queries

    Fixed

    • PrefetchIterator::key() should return 0 instead of NULL on a fresh PrefetchIterator
    • PrefetchIterator::next() shouldn't skip fetched results after PrefetchIterator::count() on a fresh PrefetchIterator
    • PrefetchIterator::rewind() no longer results in duplicate documents when invoked mid-set
    • Fixed incorrect median function
    • Fix for maxScore being returned as "NaN" when group.query doesn't match any docs (SOLR-13839)

    Changed

    • Exception message for invalid/unavailable file in Extract query now contains filename
    • Helper::rangeQuery() detects point values without parameter to turn off escaping

    Removed

    • PHP 7.2 support

    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',
    
    Source code(tar.gz)
    Source code(zip)
  • 6.1.3(Jun 24, 2021)

    6.1.3

    Changes since 6.1.2

    Fixed

    • possible exception in Debug\Detail::__toString() when sub details are missing

    Changes since 6.1.1

    Added

    • MoreLikeThis::setMaximumDocumentFrequency()
    • MoreLikeThis::setMaximumDocumentFrequencyPercentage()
    • getInterestingTerms() of MoreLikeThis Component results

    Fixed

    • Debug\Detail return value types
    • Debug\Document return value types

    Deprecated

    • Support for mlt.match.include and mlt.match.offset in MoreLikeThis Component (they only work in MLT queries)

    Changes since 6.1.0

    Fixed

    • Set Client::VERSION to '6.1.1'. Release 6.1.0 accidentally declared itself as 6.0.4.

    Changes since 6.0.4

    Added

    • Indexing labelled nested child documents through pseudo-fields
    • Extract query now supports extractFormat
    • Helper::rangeQuery() now supports left-inclusive only and right-inclusive only queries

    Fixed

    • PrefetchIterator::key() should return 0 instead of NULL on a fresh PrefetchIterator
    • PrefetchIterator::next() shouldn't skip fetched results after PrefetchIterator::count() on a fresh PrefetchIterator
    • PrefetchIterator::rewind() no longer results in duplicate documents when invoked mid-set
    • Fixed incorrect median function
    • Fix for maxScore being returned as "NaN" when group.query doesn't match any docs (SOLR-13839)

    Changed

    • Exception message for invalid/unavailable file in Extract query now contains filename
    • Helper::rangeQuery() detects point values without parameter to turn off escaping

    Removed

    • PHP 7.2 support

    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',
    
    Source code(tar.gz)
    Source code(zip)
  • 6.1.2(Jun 23, 2021)

    6.1.2

    Changes since 6.1.1

    Added

    • MoreLikeThis::setMaximumDocumentFrequency()
    • MoreLikeThis::setMaximumDocumentFrequencyPercentage()
    • getInterestingTerms() of MoreLikeThis Component results

    Fixed

    • Debug\Detail return value types
    • Debug\Document return value types

    Deprecated

    • Support for mlt.match.include and mlt.match.offset in MoreLikeThis Component (they only work in MLT queries)

    Changes since 6.1.0

    Fixed

    • Set Client::VERSION to '6.1.1'. Release 6.1.0 accidentally declared itself as 6.0.4.

    Changes since 6.0.4

    Added

    • Indexing labelled nested child documents through pseudo-fields
    • Extract query now supports extractFormat
    • Helper::rangeQuery() now supports left-inclusive only and right-inclusive only queries

    Fixed

    • PrefetchIterator::key() should return 0 instead of NULL on a fresh PrefetchIterator
    • PrefetchIterator::next() shouldn't skip fetched results after PrefetchIterator::count() on a fresh PrefetchIterator
    • PrefetchIterator::rewind() no longer results in duplicate documents when invoked mid-set
    • Fixed incorrect median function
    • Fix for maxScore being returned as "NaN" when group.query doesn't match any docs (SOLR-13839)

    Changed

    • Exception message for invalid/unavailable file in Extract query now contains filename
    • Helper::rangeQuery() detects point values without parameter to turn off escaping

    Removed

    • PHP 7.2 support

    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',
    
    Source code(tar.gz)
    Source code(zip)
  • 6.1.1(Feb 5, 2021)

    6.1.1

    Changes since 6.1.0

    Fixed

    • Set Client::VERSION to '6.1.1'. Release 6.1.0 accidentally declared itself as 6.0.4.

    Changes since 6.0.4

    Added

    • Indexing labelled nested child documents through pseudo-fields
    • Extract query now supports extractFormat
    • Helper::rangeQuery() now supports left-inclusive only and right-inclusive only queries

    Fixed

    • PrefetchIterator::key() should return 0 instead of NULL on a fresh PrefetchIterator
    • PrefetchIterator::next() shouldn't skip fetched results after PrefetchIterator::count() on a fresh PrefetchIterator
    • PrefetchIterator::rewind() no longer results in duplicate documents when invoked mid-set
    • Fixed incorrect median function
    • Fix for maxScore being returned as "NaN" when group.query doesn't match any docs (SOLR-13839)

    Changed

    • Exception message for invalid/unavailable file in Extract query now contains filename
    • Helper::rangeQuery() detects point values without parameter to turn off escaping

    Removed

    • PHP 7.2 support

    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',
    
    Source code(tar.gz)
    Source code(zip)
  • 6.1.0(Feb 5, 2021)

    6.1.0

    Changes since 6.0.4

    Added

    • Indexing labelled nested child documents through pseudo-fields
    • Extract query now supports extractFormat
    • Helper::rangeQuery() now supports left-inclusive only and right-inclusive only queries

    Fixed

    • PrefetchIterator::key() should return 0 instead of NULL on a fresh PrefetchIterator
    • PrefetchIterator::next() shouldn't skip fetched results after PrefetchIterator::count() on a fresh PrefetchIterator
    • PrefetchIterator::rewind() no longer results in duplicate documents when invoked mid-set
    • Fixed incorrect median function
    • Fix for maxScore being returned as "NaN" when group.query doesn't match any docs (SOLR-13839)

    Changed

    • Exception message for invalid/unavailable file in Extract query now contains filename
    • Helper::rangeQuery() detects point values without parameter to turn off escaping

    Removed

    • PHP 7.2 support

    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',
    
    Source code(tar.gz)
    Source code(zip)
  • 6.0.4(Nov 5, 2020)

    Changes since 6.0.3

    Added

    • PHP 8 support

    Fixed

    • Avoid Notice: Undefined variable: http_response_header

    Changes since 6.0.2

    Fixed

    • Tika based file extraction with Solr 8.6
    • Avoid TypeError if ClusterState contains no collections

    Changed

    • Require specific symfony/event-dispatcher-contracts package instead of the generic symfony/contracts

    Changes since 6.0.1

    Added

    • Support for the analytics component
    • Function builder
    • Solarium\Component\FacetSet::setMatches()
    • Solarium\Component\FacetSet::setExcludeTerms()
    • Solarium\Component\Facet\Field::setMatches()
    • Solarium\Component\Facet\Field::setExcludeTerms()
    • Solarium\Component\Highlighting\Highlighting::setMethod()

    Changed

    • Refactored Managed Resources code: use createCommand() and createInitArgs() to issue commands

    Changes since 6.0.0

    Added

    • Solarium\Component\Result\Facet\JsonRange::getBefore()
    • Solarium\Component\Result\Facet\JsonRange::getAfter()
    • Solarium\Component\Result\Facet\JsonRange::getBetween()

    Changed

    • Json range facet result now returns Solarium\Component\Result\Facet\JsonRange

    Changes since 5.2.0

    Added

    • \Solarium\Component\Result\Facet\Buckets::getNumBuckets()
    • \Solarium\Support\Utility::getXmlEncoding()
    • Raw XML commands to update query
    • Raw XML from file in update query
    • Set input encoding for select and update queries
    • Create and configure Managed Resources

    Changed

    • Thrown exceptions always implement Solarium\Exception\ExceptionInterface
    • PostBigRequest plugin now acts on PRE_EXECUTE_REQUEST event instead of POST_CREATE_REQUEST
    • CustomizeRequest plugin now acts on POST_CREATE_REQUEST event instead of PRE_EXECUTE_REQUEST
    • More strict types and type hinting
    • AdapterInterface does not extend ConfigurableInterface anymore
    • Http Adapter does not implement ConfigurableInterface anymore
    • Psr18Adapter does not implement ConfigurableInterface anymore
    • Solarium Client now accepts any PSR-15 compatible event dispatcher (previously it had to be symfony's event dispatcher)

    Fixed

    • MoreLikeThis result parsing fails on Solr Cloud
    • MinimumScoreFilter plugin might fail on Solr 7 in cloud mode

    Removed

    • PHP 7.1 support
    • Zend2HttpAdapter
    • GuzzleAdapter
    • Guzzle3Adapter
    • Endpoint::setTimeout and Endpoint::getTimeout
    • Passing local parameter options (e.g. key, tag, exclude) without the local_ prefix
    • Support for Solr versions before 7.7

    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',
    
    Source code(tar.gz)
    Source code(zip)
  • 6.0.3(Oct 14, 2020)

    Changes since 6.0.2

    Fixed

    • Tika based file extraction with Solr 8.6
    • Avoid TypeError if ClusterState contains no collections

    Changed

    • Require specific symfony/event-dispatcher-contracts package instead of the generic symfony/contracts

    Changes since 6.0.1

    Added

    • Support for the analytics component
    • Function builder
    • Solarium\Component\FacetSet::setMatches()
    • Solarium\Component\FacetSet::setExcludeTerms()
    • Solarium\Component\Facet\Field::setMatches()
    • Solarium\Component\Facet\Field::setExcludeTerms()
    • Solarium\Component\Highlighting\Highlighting::setMethod()

    Changed

    • Refactored Managed Resources code: use createCommand() and createInitArgs() to issue commands

    Changes since 6.0.0

    Added

    • Solarium\Component\Result\Facet\JsonRange::getBefore()
    • Solarium\Component\Result\Facet\JsonRange::getAfter()
    • Solarium\Component\Result\Facet\JsonRange::getBetween()

    Changed

    • Json range facet result now returns Solarium\Component\Result\Facet\JsonRange

    Changes since 5.2.0

    Added

    • \Solarium\Component\Result\Facet\Buckets::getNumBuckets()
    • \Solarium\Support\Utility::getXmlEncoding()
    • Raw XML commands to update query
    • Raw XML from file in update query
    • Set input encoding for select and update queries
    • Create and configure Managed Resources

    Changed

    • Thrown exceptions always implement Solarium\Exception\ExceptionInterface
    • PostBigRequest plugin now acts on PRE_EXECUTE_REQUEST event instead of POST_CREATE_REQUEST
    • CustomizeRequest plugin now acts on POST_CREATE_REQUEST event instead of PRE_EXECUTE_REQUEST
    • More strict types and type hinting
    • AdapterInterface does not extend ConfigurableInterface anymore
    • Http Adapter does not implement ConfigurableInterface anymore
    • Psr18Adapter does not implement ConfigurableInterface anymore
    • Solarium Client now accepts any PSR-15 compatible event dispatcher (previously it had to be symfony's event dispatcher)

    Fixed

    • MoreLikeThis result parsing fails on Solr Cloud
    • MinimumScoreFilter plugin might fail on Solr 7 in cloud mode

    Removed

    • PHP 7.1 support
    • Zend2HttpAdapter
    • GuzzleAdapter
    • Guzzle3Adapter
    • Endpoint::setTimeout and Endpoint::getTimeout
    • Passing local parameter options (e.g. key, tag, exclude) without the local_ prefix
    • Support for Solr versions before 7.7

    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',
    
    Source code(tar.gz)
    Source code(zip)
  • 6.0.2(Aug 27, 2020)

    Changes since 6.0.1

    Added

    • Support for the analytics component
    • Function builder
    • Solarium\Component\FacetSet::setMatches()
    • Solarium\Component\FacetSet::setExcludeTerms()
    • Solarium\Component\Facet\Field::setMatches()
    • Solarium\Component\Facet\Field::setExcludeTerms()
    • Solarium\Component\Highlighting\Highlighting::setMethod()

    Changed

    • Refactored Managed Resources code: use createCommand() and createInitArgs() to issue commands

    Changes since 6.0.0

    Added

    • Solarium\Component\Result\Facet\JsonRange::getBefore()
    • Solarium\Component\Result\Facet\JsonRange::getAfter()
    • Solarium\Component\Result\Facet\JsonRange::getBetween()

    Changed

    • Json range facet result now returns Solarium\Component\Result\Facet\JsonRange

    Changes since 5.2.0

    Added

    • \Solarium\Component\Result\Facet\Buckets::getNumBuckets()
    • \Solarium\Support\Utility::getXmlEncoding()
    • Raw XML commands to update query
    • Raw XML from file in update query
    • Set input encoding for select and update queries
    • Create and configure Managed Resources

    Changed

    • Thrown exceptions always implement Solarium\Exception\ExceptionInterface
    • PostBigRequest plugin now acts on PRE_EXECUTE_REQUEST event instead of POST_CREATE_REQUEST
    • CustomizeRequest plugin now acts on POST_CREATE_REQUEST event instead of PRE_EXECUTE_REQUEST
    • More strict types and type hinting
    • AdapterInterface does not extend ConfigurableInterface anymore
    • Http Adapter does not implement ConfigurableInterface anymore
    • Psr18Adapter does not implement ConfigurableInterface anymore
    • Solarium Client now accepts any PSR-15 compatible event dispatcher (previously it had to be symfony's event dispatcher)

    Fixed

    • MoreLikeThis result parsing fails on Solr Cloud
    • MinimumScoreFilter plugin might fail on Solr 7 in cloud mode

    Removed

    • PHP 7.1 support
    • Zend2HttpAdapter
    • GuzzleAdapter
    • Guzzle3Adapter
    • Endpoint::setTimeout and Endpoint::getTimeout
    • Passing local parameter options (e.g. key, tag, exclude) without the local_ prefix
    • Support for Solr versions before 7.7

    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',
    
    Source code(tar.gz)
    Source code(zip)
  • 6.0.1(Jul 3, 2020)

    Changes since 6.0.0

    Added

    • Solarium\Component\Result\Facet\JsonRange::getBefore()
    • Solarium\Component\Result\Facet\JsonRange::getAfter()
    • Solarium\Component\Result\Facet\JsonRange::getBetween()

    Changed

    • Json range facet result now returns Solarium\Component\Result\Facet\JsonRange

    Changes since 5.2.0

    Added

    • \Solarium\Component\Result\Facet\Buckets::getNumBuckets()
    • \Solarium\Support\Utility::getXmlEncoding()
    • Raw XML commands to update query
    • Raw XML from file in update query
    • Set input encoding for select and update queries
    • Create and configure Managed Resources

    Changed

    • Thrown exceptions always implement Solarium\Exception\ExceptionInterface
    • PostBigRequest plugin now acts on PRE_EXECUTE_REQUEST event instead of POST_CREATE_REQUEST
    • CustomizeRequest plugin now acts on POST_CREATE_REQUEST event instead of PRE_EXECUTE_REQUEST
    • More strict types and type hinting
    • AdapterInterface does not extend ConfigurableInterface anymore
    • Http Adapter does not implement ConfigurableInterface anymore
    • Psr18Adapter does not implement ConfigurableInterface anymore
    • Solarium Client now accepts any PSR-15 compatible event dispatcher (previously it had to be symfony's event dispatcher)

    Fixed

    • MoreLikeThis result parsing fails on Solr Cloud
    • MinimumScoreFilter plugin might fail on Solr 7 in cloud mode

    Removed

    • PHP 7.1 support
    • Zend2HttpAdapter
    • GuzzleAdapter
    • Guzzle3Adapter
    • Endpoint::setTimeout and Endpoint::getTimeout
    • Passing local parameter options (e.g. key, tag, exclude) without the local_ prefix
    • Support for Solr versions before 7.7

    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',
    
    Source code(tar.gz)
    Source code(zip)
  • 6.0.0(Jun 22, 2020)

    Changes since 5.2.0

    Added

    • \Solarium\Component\Result\Facet\Buckets::getNumBuckets()
    • \Solarium\Support\Utility::getXmlEncoding()
    • Raw XML commands to update query
    • Raw XML from file in update query
    • Set input encoding for select and update queries
    • Create and configure Managed Resources

    Changed

    • Thrown exceptions always implement Solarium\Exception\ExceptionInterface
    • PostBigRequest plugin now acts on PRE_EXECUTE_REQUEST event instead of POST_CREATE_REQUEST
    • CustomizeRequest plugin now acts on POST_CREATE_REQUEST event instead of PRE_EXECUTE_REQUEST
    • More strict types and type hinting
    • AdapterInterface does not extend ConfigurableInterface anymore
    • Http Adapter does not implement ConfigurableInterface anymore
    • Psr18Adapter does not implement ConfigurableInterface anymore
    • Solarium Client now accepts any PSR-15 compatible event dispatcher (previously it had to be symfony's event dispatcher)

    Fixed

    • MoreLikeThis result parsing fails on Solr Cloud
    • MinimumScoreFilter plugin might fail on Solr 7 in cloud mode

    Removed

    • PHP 7.1 support
    • Zend2HttpAdapter
    • GuzzleAdapter
    • Guzzle3Adapter
    • Endpoint::setTimeout and Endpoint::getTimeout
    • Passing local parameter options (e.g. key, tag, exclude) without the local_ prefix
    • Support for Solr versions before 7.7

    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',
    
    Source code(tar.gz)
    Source code(zip)
  • 6.0.0-rc.1(Jun 18, 2020)

    [6.0.0-rc.1]

    Added

    • \Solarium\Support\Utility::getXmlEncoding()

    Fixed

    • MoreLikeThis result parsing fails on Solr Cloud
    • MinimumScoreFilter plugin might fail on Solr 7 in cloud mode
    Source code(tar.gz)
    Source code(zip)
  • 6.0.0-beta.1(Jun 15, 2020)

    [6.0.0-beta.1]

    Changed

    • PostBigRequest plugin now acts on PRE_EXECUTE_REQUEST event instead of POST_CREATE_REQUEST
    • CustomizeRequest plugin now acts on POST_CREATE_REQUEST event instead of PRE_EXECUTE_REQUEST

    Removed

    • PHP 7.1 support
    Source code(tar.gz)
    Source code(zip)
  • 6.0.0-alpha.1(Jun 5, 2020)

    Added

    • Raw XML commands to update query
    • Raw XML from file in update query
    • Set input encoding for select and update queries
    • Create and configure Managed Resources

    Changed

    • More strict types and type hinting
    • AdapterInterface does not extend ConfigurableInterface anymore
    • Http Adapter does not implement ConfigurableInterface anymore
    • Psr18Adapter does not implement ConfigurableInterface anymore
    • Solarium Client now accepts any PSR-15 compatible event dispatcher (previously it had to be symfony's event dispatcher)

    Removed

    • Zend2HttpAdapter
    • GuzzleAdapter
    • Guzzle3Adapter
    • Endpoint::setTimeout and Endpoint::getTimeout
    • Passing local parameter options (e.g. key, tag, exclude) without the local_ prefix
    • Support for Solr versions before 7.7
    Source code(tar.gz)
    Source code(zip)
  • 5.2.0(Apr 13, 2020)

    [5.2.0]

    Added

    • PSR-18 http adapter

    Fixed

    • PUT requests against Solr 8.5.0 using the Zend2Http and Http adapters

    Deprecated

    • Zend2HttpAdapter, use PSR-18 http adapter instead
    • GuzzleAdapter, use PSR-18 http adapter instead
    • Guzzle3Adapter, use PSR-18 http adapter instead
    • Endpoint::setTimeout and Endpoint::getTimeout, configure the timeout on the http adapter instead
    Source code(tar.gz)
    Source code(zip)
  • 5.1.6(Dec 7, 2019)

    [5.1.6]

    Added

    • Range facet pivot support
    • Support for useConfiguredElevatedOrder
    • FilterQuery::setCache and FilterQuery::setCost()

    Fixed

    • Setting limit for pivot facets

    Changed

    • Internal handling of Solr local parameters

    Deprecated

    • Helper::cacheControl(). Use FilterQuery::setCache() and FilterQuery::setCost() instead.
    Source code(tar.gz)
    Source code(zip)
  • 5.1.4(Oct 2, 2019)

    [5.1.4]

    Added

    • Solarium\Component\Facet\Pivot::setLimit()
    • Solarium\Component\Facet\Pivot::getLimit()

    Fixed

    • Client::checkExact() checks against wrong version number
    Source code(tar.gz)
    Source code(zip)
  • 5.1.3(Sep 13, 2019)

  • 5.1.2(Sep 9, 2019)

    [5.1.2]

    Fixed

    • BufferedAdd does not support Symfony event dispatcher
    • An empty array as value in combination with the set modifier should remove a field when performing Atomic Updates
    Source code(tar.gz)
    Source code(zip)
  • 5.1.1(Sep 6, 2019)

    [5.1.1]

    Fixed

    • PHP 7.1 compatibility issue: date constants are not available as part of DateTimeInterface before PHP 7.2.0
    • Use Symfony\Contracts\EventDispatcher\Event instead of deprecated Symfony\Component\EventDispatcher\Event
    Source code(tar.gz)
    Source code(zip)
Owner
Solarium PHP library organization
Solarium PHP library organization
Solarium PHP library organization
symfony solarium integration and solr management

solarium-bundle symfony bundle for solarium integration and solr management. current state of this bundle for now this bundle is me messing about with

null 2 Jan 11, 2022
MeiliSearch PHP is the MeiliSearch API client for PHP developers.

MeiliSearch PHP is the MeiliSearch API client for PHP developers. ⚡ The MeiliSearch API client written for PHP ??

MeiliSearch 362 Jan 4, 2023
Official PHP low-level client for Elasticsearch.

elasticsearch-php Official low-level client for Elasticsearch. Its goal is to provide common ground for all Elasticsearch-related code in PHP; because

elastic 5k Dec 31, 2022
Elastica is a PHP client for elasticsearch

Elastica: elasticsearch PHP Client All documentation for Elastica can be found under Elastica.io. If you have questions, don't hesitate to ask them on

Nicolas Ruflin 2.2k Dec 23, 2022
Official PHP low-level client for Elasticsearch.

elasticsearch-php Official low-level client for Elasticsearch. Its goal is to provide common ground for all Elasticsearch-related code in PHP; because

elastic 5k Jan 1, 2023
Sphinx Search library provides SphinxQL indexing and searching features

Sphinx Search Sphinx Search library provides SphinxQL indexing and searching features. Introduction Installation Configuration (simple) Usage Search I

Ripa Club 62 Mar 14, 2022
A fully featured full text search engine written in PHP

TNTSearch TNTSearch is a full-text search (FTS) engine written entirely in PHP. A simple configuration allows you to add an amazing search experience

TNT Studio 2.9k Jan 8, 2023
A php trait to search laravel models

Searchable, a search trait for Laravel Searchable is a trait for Laravel 4.2+ and Laravel 5.0 that adds a simple search function to Eloquent Models. S

Nicolás López Jullian 2k Dec 27, 2022
Build and execute an Elasticsearch search query using a fluent PHP API

PACKAGE IN DEVELOPMENT, DO NOT USE YET Build and execute ElasticSearch queries using a fluent PHP API This package is a lightweight query builder for

Spatie 94 Dec 14, 2022
ScoutAPM PHP Agent for the Laravel Framework

Scout Laravel APM Agent Monitor the performance of PHP Laravel applications with Scout's PHP APM Agent. Detailed performance metrics and transaction t

Scout APM 22 Jan 2, 2023
This script was made to aid the process of migrating PHP and MySQL based websites

This script was made to aid the process of migrating PHP and MySQL based websites. Works with most common CMSes.

interconnect/it 3.9k Jan 5, 2023
PHP Solr client library

Solarium PHP Solr Client Library What is Solarium? Solarium is a PHP Solr client library that accurately models Solr concepts. Where many other Solr l

Solarium PHP library organization 902 Dec 30, 2022
A TYPO3 extension that integrates the Apache Solr search server with TYPO3 CMS. dkd Internet Service GmbH is developing the extension. Community contributions are welcome. See CONTRIBUTING.md for details.

Apache Solr for TYPO3 CMS A TYPO3 extension that integrates the Apache Solr enterprise search server with TYPO3 CMS. The extension has initially been

Apache Solr for TYPO3 126 Dec 7, 2022
symfony solarium integration and solr management

solarium-bundle symfony bundle for solarium integration and solr management. current state of this bundle for now this bundle is me messing about with

null 2 Jan 11, 2022
Google-api-php-client - A PHP client library for accessing Google APIs

Google APIs Client Library for PHP Reference Docs https://googleapis.github.io/google-api-php-client/main/ License Apache 2.0 The Google API Client Li

Google APIs 8.4k Dec 30, 2022
OpenAI API Client is a component-oriented, extensible client library for the OpenAI API. It's designed to be faster and more memory efficient than traditional PHP libraries.

OpenAI API Client in PHP (community-maintained) This library is a component-oriented, extensible client library for the OpenAI API. It's designed to b

Mounir R'Quiba 6 Jun 14, 2023
The Salla OAuth Client library is designed to provide client applications with secure delegated access to Salla Merchant stores.

Salla Provider for OAuth 2.0 Client This package provides Salla OAuth 2.0 support for the PHP League's OAuth 2.0 Client. To use this package, it will

Salla 14 Nov 27, 2022
PHP Kafka client is used in PHP-FPM and Swoole. PHP Kafka client supports 50 APIs, which might be one that supports the most message types ever.

longlang/phpkafka Introduction English | 简体中文 PHP Kafka client is used in PHP-FPM and Swoole. The communication protocol is based on the JSON file in

Swoole Project 235 Dec 31, 2022
amadeus-ws-client: PHP client for the Amadeus GDS SOAP Web Service interface

amadeus-ws-client: PHP client for the Amadeus GDS SOAP Web Service interface This client library provides access to the Amadeus GDS SOAP Web Service i

Amadeus Benelux 164 Nov 18, 2022
PHP JSON-RPC 2.0 Server/Client Implementation with Automatic Client Class Generation via SMD

PHP JSON-RPC 2.0 Server/Client Implementation with Automatic Client Class Generation via SMD

Sergey Bykov 63 Feb 14, 2022