Dear Wiki user,

You have subscribed to a wiki page or wiki category on "Nutch Wiki" for change 
notification.

The "WritingPluginExample" page has been changed by LewisJohnMcgibbney:
http://wiki.apache.org/nutch/WritingPluginExample?action=diff&rev1=16&rev2=17

  <meta name="recommended" content="plugins" />
  }}}
  
- In order to do this we need to write a plugin that extends 3 different 
extension points.  We need to extend the HTMLParser (which in turn extends the 
[[http://nutch.apache.org/apidocs-1.3/org/apache/nutch/parse/Parser.html|Parser]]
 class) in order to get the recommended terms out of the meta tags.  The 
[[http://nutch.apache.org/apidocs-1.3/org/apache/nutch/indexer/IndexingFilter.html|IndexingFilter]]
 will need to be extended to add a recommended field to the index.  Finally we 
need to add the new field to our Nutch schema.xml which will add the ability to 
search against the new field in the index.
+ In order to do this we need to write a plugin that extends 2 different 
extension points.  Firstly we need to extend the 
[[http://nutch.apache.org/apidocs-1.3/org/apache/nutch/indexer/IndexingFilter.html|IndexingFilter]]
 by creating an URLMetaIndexingFilter as we need to add any additional 
meta-tags to the index. Secondly we need to extend the 
[[http://nutch.apache.org/apidocs-1.3/org/apache/nutch/scoring/ScoringFilter.html|ScoringFilter]]
 by creating an URLMetaScoringFilter. The idea here is that this will take the 
metatags we have listed in our "urlmeta.tags" property, and looks for them 
inside the parseData object. This allows us to match recommended terms out of 
the meta tags. If there was no property within nutch-default.xml for us to 
specify these terms we would be required to add the new field to our Nutch 
schema.xml which would also add the ability to search against the new field in 
the index.
  
  == Setup ==
  Start by 
[[http://svn.apache.org/repos/asf/nutch/tags/release-1.3/|downloading]] the 
Nutch-1.3 source code.  Once you've got that make sure it compiles as is before 
you decide to make any changes.  You should be able to get it to compile by 
running ant from the directory you downloaded the source to.  If you have 
trouble you can write to one of the [[Mailing|Mailing Lists]].

Reply via email to