Support for Search API Solr 4.3.x

Created on 22 November 2023, about 1 year ago

Problem/Motivation

I just read the release notes for version 4.3.0 β†’ (released in September 2023) of the Search API Solr module. This bit has me worried a bit:

In order to support advanced highlighting and other features, the Solr schema provided by Search API Solr 4.3 got some fundamental changes, for example the usage of StandardTokenizer and storeOffsetsWithPositions.
When upgrading the module to 4.3.x from 4.2.x and earlier you still can read an existing Solr index and perform searches.
But if you write (index) data you'll run into errors like cannot change field "xyz" from index options=DOCS_AND_FREQS_AND_POSITIONS to inconsistent index options=DOCS_AND_FREQS_AND_POSITIONS_AND_OFFSETS.
There're different ways to deal with the required update. But all require Solr knowledge.
But the safest way is to delete the existing core (or collection in case of Solr Cloud) and to create a new core (or collection) using a new Solr config-set generated by Search API Solr 4.3.x and to re-index your data afterwards.
If you want to avoid downtime of your service, you can also create a new core (or collection), clone and adjust the Search API server and index configs and index all your data twice, while users can still search via the old core (or collection). Afterwards you can use Solr's rename or alias capabilities to switch both cores (or collections) and delete the cloned Search API server and index configs.

Is this something to be worried about when upgrading on Acquia?

Steps to reproduce

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

πŸ’¬ Support request
Status

Active

Version

3.1

Component

Miscellaneous

Created by

πŸ‡ΊπŸ‡ΈUnited States bkosborne New Jersey, USA

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

Comments & Activities

  • Issue created by @bkosborne
  • πŸ‡ΊπŸ‡ΈUnited States japerry KVUO

    Yes, there is good cause to be worried. While acquia search would support Search API Solr 4.3.x (we're just a connector, and doesn't appear that the class APIs have changed), it would require customers to download a new configset.

    It also means that we should update our 'default' configsets as well. I've let product know about it. Likely the resolution will be a note in our knowledge base and an additional configset option. Since customers are in control of their search configuration, it will be on them to migrate when its appropriate.

  • πŸ‡ΊπŸ‡ΈUnited States bkosborne New Jersey, USA

    Thanks. Sounds like I need to wait for a new default configset to be available and then come up with a migration plan. We have about 7 solr indexes (in each environment).

  • πŸ‡ΊπŸ‡ΈUnited States bkosborne New Jersey, USA

    Is there any update on this? The 4.2.x version of Search API has been marked as unsupported.

  • πŸ‡ΊπŸ‡ΈUnited States bkosborne New Jersey, USA
  • πŸ‡ΊπŸ‡ΈUnited States bkosborne New Jersey, USA

    Hi Jakob, I noticed there's a new Acquia-provided configset available called "(Latest) Drupal 9/10 - Search API Solr 4.3.2 - Solr 8 - [drupal-4.3.2-solr-8.x-0] - v1.0

    Should I follow this process:

    1. Update from Search API Solr 4.2.x to 4.3.x
    2. Edit the existing Solr index in Acquia Search and change its config set to the new one
    3. reindex? presumably?

    Do I need to completely delete the search core (index?) or is just changing the config set suitable?

    Thank you

  • πŸ‡ΊπŸ‡ΈUnited States bkosborne New Jersey, USA

    I tested my steps above and they didn't work. When re-indexing, I was getting errors like "cannot change field "xyz" from index options=DOCS_AND_FREQS_AND_POSITIONS to inconsistent index options=DOCS_AND_FREQS_AND_POSITIONS_AND_OFFSETS", just like the release notes for Search API Solr 4.3.x β†’ indicate I would.

    I had to delete the index from Acquia Cloud UI, re-create it using the new configset, then reindex the site.

Production build 0.71.5 2024