Is this correct.. NativeCrawler nativeCrawler = null; NutchBean nutchBean = null; Query nutchQuery = null; Hits nutchHits = null; for (int index=0; index<10; index++) { nativeCrawler = new NativeCrawler("www.ajpm.com", "ajpm-index", 2, 5); int maxHits = 1000; (*) nutchBean = new NutchBean( nativeCrawler.getConfig(), nativeCrawler.getIndexPath()); nutchQuery = Query.parse("gold", nativeCrawler.getConfig()); nutchHits = nutchBean.search(nutchQuery, maxHits); nutchBean.close(); System.out.println("gold nutchHits: " + nutchHits.getLength()); } nutchQuery = null; nutchBean = null; System.out.println("credit nutchHits: " + nutchHits.getLength());
Everytime I execute this (*) line a new thread is started and never ends. At the end of this I have ten threads. This loop in real life might execute 5000 times.. How does a person close off, shutdown a nutchBean object. I call close when, and as soon as, I am done with it. NutchCrawler is my code that basically points me to the nutch index directory. Thank you for the help ray