Property :: repairIndex - Repair Index for current collection
The function checks the physical consistency of the index and repairs detected damages. When no key name is passed, the currently selected index will be repaired. Messages about repair actions are written to the error log file.
The function will remove index entries pointing to invalid instance (deleted). It repairs also index tree information in large indexes.
The function will not detect logical inconsistencies in indexes, i.e. missing index entries or invalid keys. In order to repair this type of inconsistency, one may call repairKey(), rebuildIndex() or repairCollection().
Note: after repairing a single index, the number of elements in the index may differ from other indexes. Especially, when entries have been removed from the index, other indexes for the collection should be repaired as well.
The function works similar as callingto calling checkCollection("-C:I -R:u").
The result string contains the result of an action or operation.
Implementation overview
- Repair Index for current collection
Property :: repairIndex ( sKeyName ) - Repair language depending (generic) index
Property :: repairIndex ( sKeyName, sGenericType )
Implementation details
-
Repair Index for current collection
const odaba::String Property  :: repairIndex ( odaba::String &sKeyName )
The function returns a string containing repair protocol messages. Errors because of duplicate keys are shown in the protocol string.
- sKeyName
- Key name
The key name must be the name of a key defined for the given structure. Thekey name is passed as string with maximum 40 characters.
In order to pass no key name, an empty string ( String() ) has to be passed.
to list
- sKeyName
- Key name
-
Repair language depending (generic) index
const odaba::String Property  :: repairIndex ( odaba::String &sKeyName, odaba::String &sGenericType )
In order to repair one of language dependent indexes, the language name (sGenericType) has to be passed in addition
- sKeyName
- Key name
The key name must be the name of a key defined for the given structure. Thekey name is passed as string with maximum 40 characters.
In order to pass no key name, an empty string ( String() ) has to be passed.
- sGenericType
- Generic type name
The type for a generic attribute is a valid value from the basic enumeration of the generic attribute. The generic type name is a valid enumerator name. An empty string indicates an undefined generic type.
to list
- sKeyName
- Key name