fixing lucene 4.1/solr corrupted index -


my lucene index - built solr using lucene4.1 - is, think, corrupted. upon trying read index using following code org.apache.solr.common.solrexception: no such core: collection1 exception:

file configfile = new file(cachefolder + file.separator + "solr.xml"); corecontainer container = new corecontainer(cachefolder, configfile); solrserver server = new embeddedsolrserver(container, "collection1"); modifiablesolrparams params = new modifiablesolrparams(); params.set("q", idfieldname + ":" + clientutils.escapequerychars(queryid)); params.set("fl",idfieldname+","+valuefieldname);  queryresponse response = server.query(params) 

i used "checkindex" util check integrity of index , seems not able perform task throwing following error:

opening index @ /....../solrindex_cache/zookeeper/solr/collection1/data/index  error: not read segments file in directory java.io.filenotfoundexception: /....../solrindex_cache/zookeeper/solr/collection1/data/index/segments_b5tb (no such file or directory)     @ java.io.randomaccessfile.open(native method)     @ java.io.randomaccessfile.<init>(randomaccessfile.java:233)     @ org.apache.lucene.store.mmapdirectory.openinput(mmapdirectory.java:223)     @ org.apache.lucene.index.segmentinfos.read(segmentinfos.java:285)     @ org.apache.lucene.index.segmentinfos$1.dobody(segmentinfos.java:347)     @ org.apache.lucene.index.segmentinfos$findsegmentsfile.run(segmentinfos.java:783)     @ org.apache.lucene.index.segmentinfos$findsegmentsfile.run(segmentinfos.java:630)     @ org.apache.lucene.index.segmentinfos.read(segmentinfos.java:343)     @ org.apache.lucene.index.checkindex.checkindex(checkindex.java:383)     @ org.apache.lucene.index.checkindex.main(checkindex.java:1777) 

the file segments_b5tb index checker looking indeed missing in index folder. file looks similar segments.gen.

is there way diagnose has gone wrong , if possible, means fix took me 2 weeks build index...

many many kind advice!

if segments.gen file only file see, out of luck, otherwise, can try using checkindex check errors, , repair index. since tool fixes index removing problematic segments, there may cerainly lost data result.


Comments

Popular posts from this blog

android - Get AccessToken using signpost OAuth without opening a browser (Two legged Oauth) -

org.mockito.exceptions.misusing.InvalidUseOfMatchersException: mockito -

google shop client API returns 400 bad request error while adding an item -