有人研究nutch吗?

最近由于工作需要,研究了一下nutch,遇到几个问题,不知道有没有这方面有经验的同行
一是url抓取的过滤正则crawl-urlfilter.txt 加上 +^http://abc.com/[a-zA-Z]*/就不能正常抓取
二是我只想抓取详细内容页,即不想抓取列表页,但想想在抓取上没法做.因为过滤了列表页就不会有详细页,所以我在创建索引上过滤,只索引详细页,在regex-urlfilter.txt中写规则,改动org.apache.nutch.indexer.Indexer
                        String newUrl = "";
                        newUrl = urlFilters.filter(doc.getField("url").stringValue());
                        if(doc.getField("url").stringValue().equals(newUrl))
                        {
                            if (LOG.isInfoEnabled()) {
                                LOG.info(new StringBuffer(" Indexing [").append(
                                         doc.getField("url").stringValue()).append(
                                         "]").append(
                                         " with analyzer ").append(analyzer).append(
                                         " (").append(doc.get("lang")).append(")"));
                            }
                            writer.addDocument(doc, analyzer);
                        }


这样能达到我要的效果.可我本来想应该在插件org.apache.nutch.indexer.basic.BasicIndexingFilter中做相应修改也能达到.试过之后不能达到预想的结果,不知道为什么没有运行此过滤.注:相应配置没有问题

三是如果能对抓回来的东西进行分类,目前这个还没有思路,看过插件的教程,用meta实现,但抓这么多网站,谁会遵循我们自己的设定规则呢

以上问题希望能得到有相关经验的人指教

你可能感兴趣的:(apache,html,.net,xml,正则表达式)