You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@nutch.apache.org by DS jha <ae...@gmail.com> on 2007/07/26 18:15:15 UTC

unable to open nutch index using IndexReader

Hi -

When I am trying to open crawldb/indexes that was built using Nutch,
the system is throwing an exception - java.io.FileNotFoundException -
access is denied at java.io.RandomAccessFile.open()..

The java code I am using is similar to what Nutch uses in IndexSearcher class -


		Directory dir = getDirectory(new Path(indexdb));
		if (IndexReader.isLocked(dir)) {
			IndexReader.unlock(dir);
		}
		indexReader = IndexReader.open(dir);


	  private Directory getDirectory(Path file) throws Exception {
	    if ("local".equals(this.fs.getName())) {
	        return FSDirectory.getDirectory(file.toString(), false);
	      } else {
	        return new FsDirectory(this.fs, file, false, conf);
	      }		
	  }

any thoughts?


Thanks,
Jha