We found that 5M of our 12M statistics records did not have a uid. The absence of this field caused the sharding process to fail.
-
Add the following to solr.xml
<core name="tstatistics" instanceDir="tstatistics" />
-
Build solrFix-2.0.jar using the pom file listed above
-
Run the solrFix jar repeatedly until all records have been copied from "statitistics" to "tstatistics". This calls the SolrTouch class which reads each statistics record and copies it (exluding uid and version). This will force the re-initialization of these fields.
This process runs into heap or garbage collection contstraints when processing large numbers of items. On line #63, tune the process to set a maximum number of records to process at one time. (Recommended: 100,000 to 500,000)