hi all I confronted a strange problem when feed data to solr. I started feeding and then Ctrl+C to kill feed program(post.jar). Then because XML stream is terminated unnormally, DirectUpdateHandler2 will throw an exception. And I goto the index directory and sorted it by date. newest files are fdt and fdx. That's right, because index files such as tii tis are now in memory. Then I shutdown tomcat by ./bin/shutdown.sh. When I restarted tomcat, The index is corrupted. when I searched, the docID don't exist, An exception in TermScorer return norms == null ? raw : raw * SIM_NORM_DECODER[norms[doc] & 0xFF] will be throwed because doc is out of range of norms[]. it also be throwed in SegmentTermDocs public int read(final int[] docs, final int[] freqs) if (deletedDocs == null || !deletedDocs.get(doc)) get(doc) also out of range of deletedDocs It seems that index file are not correct so when docId is decoded, it's not a correct one.
Another phenomenon, When I Ctrl+C post.jar, and I feed some other data to let it commit successfully. it's ok It seems the buffed index in memory will flush to disk when tomcat is shutdown. the flushed file is not corrected. Anyone confront this problem before?