- Issue created by @ressa
- π©πͺ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
andstoreOffsetsWithPositions
.
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 likecannot 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. - π©π°Denmark ressa Copenhagen
Thanks for clarifying what the problem and solution is, and updating the Release Note with a section about it today.
- πΊπΈUnited States somebodysysop
I have a question about creating a new core.
This is my normal process:
from /var/solr/data:
mkdir newCore
mkdir newCorei/data
cp -fr oldCore/conf/ newCoreThen create the core in the Solr dashboard and "Add Core"
Sounds like the only thing different about this process will be to upload the configuration files from configs.zip to newCore/conf instead of copying them from oldCore.
- πΊπΈUnited States bburg Washington D.C.
Steps to fix the index via drush, with a Pantheon focus.
1. Get the list of the servers to get IDs
drush search-api:server-list
2. Run these commands to clear the Search schema schema from the API.
drush sapi-sd SERVER_ID drush sapi-se SERVER_ID drush solr-reload SERVER_ID
Note: the search_api_pantheon_admin module must be enabled for this command
drush search-api:clear drush search-api-pantheon:force-cleanup SERVER_ID
Note: Use server ID in step 1
3. Repost schema and re-enable the serverdrush search-api-pantheon:postSchema SERVER_ID drush sapi-ena SERVER_ID
4. Queue all content for re-indexing.
drush search-api:reset-tracker
5. Run the reindex.
drush search-api:index
Credit goes completely to mattdanger β