I needed to change the service classes for some Search API Solr non-Drupal servers with read-only indexes. One of the indexes has over 100 fields. I did not wish to reconfigure the indexes and their facets.
In order to use my new service class extensions, I disabled the servers and indexes, deleted the old servers and created new ones which I then attached the indexes to. This appeared to work just fine. However, in the log file, for each deleted server, there was a notice logged:
"An error occurred while deleting an index' data: '400' Status: Bad Request."
I certainly had not wanted to delete the index records held by search_api_solr much less lose any index data. All of the indexes were set as 'read-only' and yet deleting the server called removeIndex() which sent a Solr query to delete the read-only indexes. (Luckily the query failed or I may have lost an index with over 1 million records.)
The method I used to switch service classes otherwise worked fine, all servers and facets are working normally.
Comment | File | Size | Author |
---|---|---|---|
#1 | 1319544--removing-read-only-indexes-1.patch | 966 bytes | drunken monkey |
Comments
Comment #1
drunken monkeyUgh, you're right, that's potentially desastrous … Thanks for reporting!
I think the attached patch should help, please try it out (on a development server, of course)!
Comment #2
zenlan CreditAttribution: zenlan commentedThat works fine, thanks very much!
Comment #3
drunken monkeyGreat, committed.