Content nodes can't be indexed

Created on 5 October 2023, over 1 year ago

Respect the submission guidelines above! Drupal.org issue forks cause additional work for the project maintainer!

Setup

  • Solr version: 8.11.2
  • Drupal Core version: 9.5.11
  • Search API version: 8.x-1.29
  • Search API Solr version: 4.3.0
  • Configured Solr Connector: Standard

Issue

Standing up a new index on Solr, can index Media ok but all Content nodes are failing with:
Drupal\search_api_solr\SearchApiSolrException while indexing item entity:node/10009:und: Solr endpoint http://solr:8983/ bad request (code: 400, body: Exception writing document id 31wu6z-my_solr_index-entity:node/10009:und to the index; possible analysis error: cannot change field "tm_X3b_und_title" from index options=DOCS_AND_FREQS_AND_POSITIONS to inconsistent index options=DOCS_AND_FREQS_AND_POSITIONS_AND_OFFSETS

This happens when I attempt to index Title field as Fulltext. The error does not occur if I index Title as String.

🐛 Bug report
Status

Active

Version

4.3

Component

Code

Created by

🇳🇿New Zealand jonathan_hunt

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

Comments & Activities

  • Issue created by @jonathan_hunt
  • 🇩🇰Denmark ressa Copenhagen

    I also got hit by this, and solved it, see 📌 Inconsistent index options = DOCS_AND_FREQS_AND_POSITIONS_AND_OFFSETS error after upgrade Closed: works as designed . Perhaps you can try some of the steps, and check if one of them work for you as well?

  • 🇩🇪Germany mkalkbrenner 🇩🇪

    From the release notes:

    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 you upgrade 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.

  • Status changed to Fixed over 1 year ago
  • Automatically closed - issue fixed for 2 weeks with no activity.

  • Status changed to Fixed 2 months ago
  • 🇪🇸Spain Bryan Toapanta

    Another solution to the problem has been found.

    It is as follows:

    1. Go to the Solr Server.
    2. Select de proper Server
    3. Go to "Documents".
    4. Select "XML" as "Document Type".
    5. Insert the next line in the Document Box: *:*
    6. Click on "Submit Document".

    Go to index (in drupal) and select: Clear all indexed data, Rebuild tracking information and Queue all items for reindexing.

    With these steps I have managed to solve the error message that occurred when re-indexing

Production build 0.71.5 2024