On 0.8-dev the following works for me.
1) add the config property to nutch-site.xml using this format:
<property>
<name>propertyName</name>
<value>propertyValue</value>
<description></description>
</property>
2) implement org.apache.hadoop.conf.Configurable Interface -> all
Filters IndexingFilter, ParseFilter extend this Interface already.
private Configuration configuration;
public Configuration getConf() {
return configuration;
}
public void setConf(Configuration configuration) {
this.configuration = configuration;
}
3) now get your property:
String propertyVal = configuration.get("propertyName");
HTH Thomas
On 6/28/06, Enrico Triolo <[EMAIL PROTECTED]> wrote:
Hi all.
I embedded nutch in my application and implemented an indexing plugin
to add custom index fields. I need to pass some runtime parameters to
the plugin, so I was wondering if it is possible to set additional
configuration properties at runtime through the Configuration.setXXX
methods.
In my experiments I couldn't get this to work, so at the moment I'm
just creating a configuration file and adding it with
addDefaultResource each time I run nutch in my application.
Bye,
Enrico