IBM Engineering Lifecycle Management (ELM) provides three primary repository tools commands for rebuilding and repairing different types of indexes. While some overlap exists between
rebuildTextIndices and
reindex, each command addresses a specific layer of the indexing architecture.
Command summary
repotools -rebuildIndices
Purpose
Rebuilds database indexes maintained by the underlying database (Oracle, Db2).
Use when
- The Diagnostics page reports database index issues.
- Database indexes are fragmented.
- Database performance degradation is observed.
- A DBA recommends rebuilding indexes.
Affects
repotools -rebuildTextIndices
Purpose
Recreates the Lucene full-text search index from repository data.
Use when
- Quick Search returns no results.
- Full Text Search fails.
- Search results are incomplete.
- The search index directory is missing or corrupted.
- A server migration occurred without copying the search index directory.
Affects
repotools -reindex
Purpose
Rebuilds JFS query and search indexes. Different scopes determine what gets rebuilt.
Available scopes
Query indexes only
repotools-<app> -reindex scope=query
Rebuilds:
- Triple store indexes
- Query indexes
Search indexes only
repotools-<app> -reindex scope=search
Rebuilds:
Query and search indexes
repotools-<app> -reindex scope=all
Rebuilds:
- Query indexes
- Search indexes
Complete rebuild
repotools-<app> -reindex all
Rebuilds:
- Live query indexes
- Historical query indexes
- Search indexes
This is the most comprehensive index rebuild option.
Index coverage matrix
Key observation
-
rebuildTextIndices and reindex scope=search both rebuild search indexes.
-
rebuildIndices is separate and operates only on database indexes.
Decision tree
START
|
+-- Database diagnostics or DB performance issue?
| +-- rebuildIndices
|
+-- Search failing?
| +-- Quick Search failing
| +-- Full Text Search failing
| +-- Search directory deleted
| +-- rebuildTextIndices
|
+-- Query results incorrect?
| +-- RM views incomplete
| +-- Dashboard results incorrect
| +-- reindex scope=query
|
+-- Search and Query both affected?
| +-- reindex scope=all
|
+-- Major corruption or full index rebuild required?
+-- Entire indices directory deleted
+-- Restore/migration concerns
+-- Timestamp mismatch errors
+-- reindex all
Common troubleshooting scenarios
Scenario 1: Entire indices directory deleted on JTS or DNG
Example: the following directory was deleted.
server/indices
Recommended command
repotools-jts -reindex all
repotools-rm -reindex all
Why?
- Recreates query indexes.
- Recreates search indexes.
- Rebuilds live and historical indexes.
- Provides the most complete recovery path.
Scenario 2: CCM/QM full text search directory deleted
Recommended command
repotools-ccm -rebuildTextIndices
or
repotools-qm -rebuildTextIndices
Why?
Recreates the Lucene search index from repository data.
Scenario 3: RM or JTS query results incorrect
Symptoms might include:
- Missing artifacts in views
- Incomplete dashboard results
- Query index corruption
Recommended command
repotools-rm -reindex scope=query
Why?
Only query and triple-store indexes require rebuilding.
Scenario 4: Search fails but queries work
Recommended commands
repotools-rm -reindex scope=search
or
repotools-rm -rebuildTextIndices
Why?
Both commands target search indexes.
Scenario 5: Database indices warning on Diagnostics page
Recommended command
repotools-<app> -rebuildIndices
Why?
This is a database-level issue, not a JFS or Lucene indexing problem.
Scenario 6: CRJZS5758E timestamp mismatch
Example:
CRJZS5758E
The information in the index might be incorrect because the
timestamp of the triple live index is ahead of the database.
Cause
The index contains data that is newer than the repository database. Common causes:
- The database was restored without restoring indices.
- The database and indices were restored from different backup points.
- A snapshot rollback affects only one component.
Recommended recovery
If a matching index backup exists:
Restore the matching index backup
Otherwise:
repotools-<app> -reindex all
Why?
The error involves the triple-store query index, not the search index. Therefore, the following command will not resolve this issue:
rebuildTextIndices
A complete
reindex all rebuild is required.
Backup and restore guidance
Can search indexes catch up automatically?
Yes. If a valid search index backup is restored and the application starts successfully, ELM typically processes repository changes through background indexing and eventually synchronizes the search index with the repository.
Typical flow
Backup Index
|
v
Restore Backup
|
v
Start Application
|
v
Background Indexing
|
v
Search Index Updated
When automatic catch-up usually works
- The restored index is not corrupted.
- The repository database is consistent.
- The backup is reasonably recent.
- Background indexing services are functioning correctly.
When to run rebuildTextIndices
Run a full rebuild when:
- Search results remain incomplete.
- Search-related errors appear in logs.
- The search directory was deleted.
- Repository and index backups came from different points in time.
- The index backup is very old.
- Complete certainty of search consistency is required.
Important exception
If the search index directory was completely deleted and no backup exists, use the following command:
repotools-<app> -rebuildTextIndices
This command recreates the directory and rebuilds all searchable content. Simply starting the application is not considered the recommended recovery path.
Quick reference
| Situation |
Recommended command |
| Database index problem |
rebuildIndices |
| Search problem |
rebuildTextIndices |
| Query problem |
reindex scope=query |
| Search and query problem |
reindex scope=all |
| Entire indices directory deleted |
reindex all |
| CRJZS5758E timestamp mismatch |
reindex all |
| Restored text index backup and search works |
Allow automatic catch-up |
| Restored backup but search remains inconsistent |
rebuildTextIndices |
Related topics: None
External links: Repository tools command to rebuild database indexes,
Repository tools command to rebuild text indexes,
Repository tools command to regenerate indexes
Additional contributors: None