Troubleshooting Custom Indexes After CMS 10.5+ Upgrade
Condition
If system administrators upgrade their site instance to CMS 10.5+, the custom index definitions will no longer exist in their CMS implementation. When upgrading to CMS 10.6 or CMS 10.5, the following occurs:
- Version Notes: CMS 10.6The CMS 10.6 upgrade process includes upgrading the Raven Database (RavenDB) to version 5.2 and registering the database instance as a Windows service.
- Version Notes: CMS 10.5The CMS 10.5 upgrade process includes upgrading the Raven Database (RavenDB) to version 4.2 and registering the database instance as a Windows service.
When the custom indexes migrate from RavenDB 3.5 to RavenDB 4.2 or 5.2 within a CMS implementation, the indexes become incompatible with the newer RavenDB versions.
When the indexes become incompatible, the following common issues may arise:
Auto Indexes Migrate Improperly
The auto indexes migrate improperly upon upgrade. This behavior is expected, as the new auto indexes recreate on demand as needed. Also, the system will attempt to migrate auto indexes as legacy and auto indexes. Keep in mind that if this migration process fails, this will not create an issue.
Remedy
No action required from system administrators.Concatenation in 'group by': Error
The following error may display in correlation with { result.PublishingTargetId, result.Path }:
Remedy
To resolve this error, refactor the group by the new object:group result by new {result.PublishingTargetId, result.Path}
LoadDocument(..) Syntax Change Error
The following error may display in correlation with LoadDocument(id) calls:
Remedy
RavenDB 5.2 and RavenDB 4.2 silo documents in collections, so the system requires the collection name or type in LoadDocument(..) calls.To resolve this error, use the following: in LoadDocument(..) calls:
- LoadDocument<Type>(id)
- LoadDocument(id, collectionName)
Missing Analyzers Error
The custom indexes may have missing custom analyzers.
Remedy
If a custom index has a custom analyzer, then the analyzer needs to inherit from
abstract Lucene.Net.Analysis.Analyzer
, and the system administrator
needs to place the .dll in the db server bin.
See the RavenDB: Creating Own Analyzers section for details about these requirements.