Exception: "400" Status: undefined_field_index_id: undefined_field_index_id

Created on 8 April 2011, over 13 years ago
Updated 17 July 2024, about 2 months ago

I installed the module and added a faceted search index using an apache solr server. Now whenever I try to clear an index I receive this error:

Exception: "400" Status: undefined_field_index_id: undefined_field_index_id

🐛 Bug report
Status

Fixed

Version

1.0

Component

Facets

Created by

🇺🇸United States floleft

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

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • 🇮🇳India sudip.dey

    I am having the same issue of "undefined field index_id"
    The Drupal has to connect to an existing Solr instance to index the content from Drupal.
    The Solr instance does not have index_id whereas Drupal trying to query with index_id

    Request #1. Search API Solr Debug: Response => Array
    (
    [request count] => 1
    [datetime] => 2023-08-15T10:14:20+00:00
    [query_time] => Solr query took 213.68ms.
    [Solr response headers] => Array
    (
    [0] => HTTP/1.1 500 OK
    )

    [Solr response body] => {"responseHeader":{"status":500,"QTime":67},"error":{"trace":"java.lang.NullPointerException\n\tat org.apache.solr.search.TermsQParserPlugin$1.parse(TermsQParserPlugin.java:117)\n\tat org.apache.solr.search.QParser.getQuery(QParser.java:168)\n\tat org.apache.solr.update.DirectUpdateHandler2.getQuery(DirectUpdateHandler2.java:429)\n\tat org.apache.solr.update.DirectUpdateHandler2.deleteByQuery(DirectUpdateHandler2.java:459)\n\tat org.apache.solr.update.processor.RunUpdateProcessor.processDelete(RunUpdateProcessorFactory.java:78)\n\tat

    The Solr index will have indexes from multiple sources, so cannot modify the schema as per Drupal.
    - Can we remove the index_id from Drupal so Drupal does not use index_id at all?
    - The Solr instance has camelCase which is throwing error in screen if I try to map the Solr schema field names in the machine name unde r the fields tab.
    "Field IDs must contain only lowercase letters, numbers and underscores."
    - Is there any patch for the same or this can be altered in document alter hook?
    - Using the below hooks where the document alter is not at all triggerring.
    hook_search_api_solr_field_mapping_alter
    - unset the index_id but still the same issue
    hook_search_api_solr_documents_alter
    - this hook is not triggering at all during indexing
    - is it because the it does the query first?? which is failing??

  • For the record (as this is only one of two results in Google for this issue)

    Per #12, uninstalling and reinstalling search_api and search_api_solr resolves the issue for me on Drupal 10.

Production build 0.71.5 2024