On Oct 2, 2009, at 3:38 PM, Haris Papadopoulos wrote:
Hi,
hi haris.
maybe you can use some code snippets from the nutch gui v0.2 (http://github.com/101tec/nutch
). this version has an api to reload the searcher (only nutchbeans are
supported).
for example:
SearcherFactory searcherFactory =
SearcherFactory.getInstance(configuration);
MultipleSearcher searcher = searcherFactory.get();
Hits hits = searcher.search(query, numHits, null, null, false);
searcherFactory.reload();
but maybe it is too much effort for you to setup the configuration/
crawl folder structure. the nutchgui-searcher use a little bit another
folder structure like the original nutch.
+ you need a property 'nutch.instance.folder' which define the folder
where your crawl folders exists. for example nutch.instance.folder:
'tmp/nutch/crawls'
/tmp/nutch/crawls/Crawl-1/index
/tmp/nutch/crawls/Crawl-1/segments
/tmp/nutch/crawls/Crawl-1/crawldb
...
/tmp/nutch/crawls/Crawl-2/index
/tmp/nutch/crawls/Crawl-2/segments
/tmp/nutch/crawls/Crawl-2/crawldb
hope this help's
marko