You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@nutch.apache.org by Steve Betts <sb...@minethurn.com> on 2005/10/20 20:39:01 UTC

Re: Updating files

The original question was: can I update the indexes without restarting
Tomcat.

 

The original answer was: crawl in a separate directory and use "mergesegs"
to merge the new with the old.

 

It appears to me that this doesn't really answer the question. The
"mergesegs" command takes several segments and writes all the information to
just one. I can create new segments all I want, I only run into problems
with Tomcat when I'm trying to create indexes. When I try to create a new
index, I get this stack trace. This shows that the index cannot be written.
When I stop Tomcat, it completes successfully.   Is there any way to add new
content to the database while Tomcat is running?  Is there some other index
merger that doesn't have this problem?

 

Exception in thread "main" java.io.IOException: Cannot delete _0.f0

      at org.apache.lucene.store.FSDirectory.create(FSDirectory.java:195)

      at org.apache.lucene.store.FSDirectory.init(FSDirectory.java:179)

      at
org.apache.lucene.store.FSDirectory.getDirectory(FSDirectory.java:151)

      at org.apache.lucene.index.IndexWriter.<init>(IndexWriter.java:237)

      at org.apache.nutch.indexer.IndexMerger.merge(IndexMerger.java:92)

      at com.gd.wbi.NutchMgr.crawl(NutchMgr.java:308)

      at com.gd.wbi.NutchMgr.main(NutchMgr.java:118)

 

 

Thanks,

 

Steve Betts

sbetts@minethurn.com

937-477-1797

 

 


Re: Updating files

Posted by Andy Lee <ag...@earthlink.net>.
On Oct 20, 2005, at 2:39 PM, Steve Betts wrote:
> The original question was: can I update the indexes without restarting
> Tomcat.

I suspect not.  First because of the locking issue you discovered,  
and second because the index is cached, and I don't know of any way  
of saying "refresh the cache."  I could be missing something, though  
-- I imagine we're not the first to have wanted to refresh the index  
"live."

--Andy