Search API Solr 4.3.x incompatibilities

Created on 2 November 2023, about 1 year ago
Updated 30 January 2024, 10 months ago

Original title was "Solarium dropped support for PHP 7 and changes definition of CreateHandle"

I upgraded from search_api_solr 4.2.12 to 4.3.0 which requires solarium to be upgraded.

When upgrading to Drupal 10, I managed to upgrade solarium/solarium from 6.2.8 to 6.3.3. I started getting the following fatal:

Fatal error: Declaration of Drupal\search_api_pantheon\Solarium\PantheonCurl::createHandle($request, $endpoint) must be compatible with Solarium\Core\Client\Adapter\Curl::createHandle(Solarium\Core\Client\Request $request, Solarium\Core\Client\Endpoint $endpoint): CurlHandle in /code/web/modules/contrib/search_api_pantheon/src/Solarium/PantheonCurl.php on line 16

We need to change the class so it conforms to the new footprint.

Also, after this correction, we need to identify the changes we need to make to schema.xml to support Search API Solr 4.3.0 as when I search, I recieve no results and dblog gets spammed with

Apache Tomcat/7.0.68 - Error report HTTP Status 400 - can not use FieldCache on unindexed field: boost_documenttype Status reportmessage can not use FieldCache on unindexed field: boost_documentdescription The request sent by the client was syntactically incorrect.Apache Tomcat/7.0.68
πŸ› Bug report
Status

Needs work

Version

3.0

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States generalredneck

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

  • Issue created by @generalredneck
  • @generalredneck opened merge request.
  • Status changed to Needs review about 1 year ago
  • πŸ‡ΊπŸ‡ΈUnited States generalredneck

    Just in case a patch is needed:

  • πŸ‡ΊπŸ‡ΈUnited States generalredneck

    Looks like there is more to this... I suspect that 3.0.x of this module is not compatible with Search API 4.3.x. The schema.xmls vary wildly and I get errors while searching with it installed like

    Apache Tomcat/7.0.68 - Error report HTTP Status 400 - can not use FieldCache on unindexed field: boost_documenttype Status reportmessage can not use FieldCache on unindexed field: boost_documentdescription The request sent by the client was syntactically incorrect.Apache Tomcat/7.0.68
    

    Looking through schema.xml, there is infact not any boost_document field type installed.

  • Status changed to Needs work 12 months ago
  • πŸ‡ΊπŸ‡ΈUnited States DamienMcKenna NH, USA

    I think it might be better to change composer.json to limit the versions of search_api_solr that are compatible.

    v3 is an EOL branch, it's recommended to upgrade to Solr 8 and v8 of this module.

  • πŸ‡΅πŸ‡±Poland henk

    Hi,
    I had the similar problem:

    • Drupal 9.5.x
    • Search_api_solr 4.3.1
    • Search_api_pantheon 3.0.2
    • Special pantheon config selected for sever configuration, indexing was not working (indexing but no results are indexed)

    After downgrade Search_api_solr 4.2.x, index start working. Something is not compatible with the latest version of search_api_solr module.

  • πŸ‡΅πŸ‡±Poland henk

    #3 patch is fixing in Drupal 10 PantheonCurl incompatibility problem confirmed. So it is temporary solution.

  • πŸ‡ΊπŸ‡ΈUnited States brooke_heaton

    Just here to report that I am seeing the same errors as noted in $6. I see the following error on my search View:

    can not use FieldCache on unindexed field: boost_documenttype Status reportmessage can not use FieldCache on unindexed field: boost_documentdescription The request sent by the client was syntactically incorrect.

    I am using the following modules on Drupal 9.5.11:

    Search API (search_api) 8.x-1.30
    Search API Pantheon (search_api_pantheon) 8.1.4
    Search API Solr Autocomplete (search_api_solr_autocomplete) 4.2.9
    Search API Solr Legacy (search_api_solr_legacy) 4.2.9
    Search API Solr (search_api_solr) 4.2.9

Production build 0.71.5 2024