Rebuilding the Solr index (Watson Knowledge Catalog)
You can rebuild the index to ensure that information assets are updated.
Before you begin
Important: You must have the Administrator role to complete this task.
After upgrading to version 4.6.1 or later, run the following steps:
- Check the log of the Solr pod by
running:
oc logs solr-0 -n <Namespace> | grep "Exception writing document id"
- Check to see if there is a
SolrException
error in the log. For example:2022-12-13 09:56:46.434 ERROR (qtp1279740095-23) [c:da-datasets s:shard2 r:core_node4 x:da-datasets_shard2_replica_n2] o.a.s.h.RequestHandlerBase org.apache.solr.common.SolrException: Exception writing document id c2e76d84.23d97ff8.apk82sdmn.ugp40kf.qpt2a9.6ocjq9ppatcjf5q38qd4r to the index; possible analysis error: cannot change field "hostName" from doc values type=NONE to inconsistent doc values type=SORTED => org.apache.solr.common.SolrException: Exception writing document id c2e76d84.23d97ff8.apk82sdmn.ugp40kf.qpt2a9.6ocjq9ppatcjf5q38qd4r to the index; possible analysis error: cannot change field "hostName" from doc values type=NONE to inconsistent doc values type=SORTED
- If there is an error, restart Solr before you rebuild the index by
running:
kubectl scale --replicas=0 StatefulSets solr kubectl scale --replicas=1 StatefulSets solr
About this task
If your browser times out while rebuilding the index, you can set a higher time-out setting for your browser. For example, you can use the cURL command line tool to increase the maximum wait time for your browser.
- Performance recommendations
- The reindex operation runs queries on the XMETA database and sends results to the Solr microservice. Therefore, the performance of the reindex operation depends on factors like computing capacity (like the number of CPUs, speed, availability) of iis-services pod and XMETA database, available memory, read and write speed, network speed, or Solr JVM settings.