Why do you want it to be done from code ? If you are running bin/nutch
script, just point NUTCH_CONF_DIR to different conf locations and it would
do the rest for you.


On Sat, May 4, 2013 at 11:53 AM, karthikeyan.gss
<[email protected]>wrote:

> Hi.,
> To use different configuration (conf folder) for running nutch as script we
> have option to use NUTCH_CONF_DIR
> But how we achieve this from code., if i need to call directly
> org.apache.nutch.crawl.Crawler class how should we do?
> Like for instance, below code doesnt help
>
> System.setProperty("NUTCH_CONF_DIR", "/testing/mynewconfdir");
> Configuration conf = NutchConfiguration.create();
> ToolRunner.run(conf, new Crawl(),tokenize(crawlArg));
>
> Please help me, with the same.
>
> Thanks,
> Karthik
>
>
>
> --
> View this message in context:
> http://lucene.472066.n3.nabble.com/Nutch-2-1-Use-multiple-configuration-from-code-tp4060833.html
> Sent from the Nutch - User mailing list archive at Nabble.com.
>

Reply via email to