You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@nutch.apache.org by scott green <sm...@gmail.com> on 2006/11/20 16:28:21 UTC
Errors in RegexURLFilter
Hi
Here is the main methond in RegexURLFilter,
public static void main(String args[]) throws IOException {
main(new RegexURLFilter(), args);
}
the empty RegexURLFilter() cotor will not load rules at all. So the
main method should be run failed. It shoule be
public static void main(String args[]) throws IOException {
RegexURLFilter filter = new RegexURLFilter();
filter.setConf(NutchConfiguration.create());
main(filter, args);
}
right?
And i also did not find setConf() before filter() in URLFilters. I
wonder where the rules are loaded from. Thanks
- scott
Re: Errors in RegexURLFilter
Posted by scott green <sm...@gmail.com>.
On 11/21/06, Sami Siren <ss...@gmail.com> wrote:
> scott green wrote:
> > Hi
> >
> > Here is the main methond in RegexURLFilter,
> > public static void main(String args[]) throws IOException {
> > main(new RegexURLFilter(), args);
> > }
> >
> > the empty RegexURLFilter() cotor will not load rules at all. So the
> > main method should be run failed. It shoule be
> > public static void main(String args[]) throws IOException {
> > RegexURLFilter filter = new RegexURLFilter();
> > filter.setConf(NutchConfiguration.create());
> > main(filter, args);
> > }
> >
> Yes, looks like you're right.
> > right?
> > And i also did not find setConf() before filter() in URLFilters. I
> > wonder where the rules are loaded from. Thanks
> This is done for all plugins implementing Configurable interface in
> org.apache.nutch.plugin.Extension at line #162.
Thanks, i got it :)
> --
> Sami Siren
>
Re: Errors in RegexURLFilter
Posted by Sami Siren <ss...@gmail.com>.
scott green wrote:
> Hi
>
> Here is the main methond in RegexURLFilter,
> public static void main(String args[]) throws IOException {
> main(new RegexURLFilter(), args);
> }
>
> the empty RegexURLFilter() cotor will not load rules at all. So the
> main method should be run failed. It shoule be
> public static void main(String args[]) throws IOException {
> RegexURLFilter filter = new RegexURLFilter();
> filter.setConf(NutchConfiguration.create());
> main(filter, args);
> }
>
Yes, looks like you're right.
> right?
> And i also did not find setConf() before filter() in URLFilters. I
> wonder where the rules are loaded from. Thanks
This is done for all plugins implementing Configurable interface in
org.apache.nutch.plugin.Extension at line #162.
--
Sami Siren