Reputation: 31
I try to activate the headings plugin in nutch 1.8, but somehow it does not work. Here are the parts of my nutch-site.xml:
<property>
<name>plugin.includes</name>
<value>protocol-http|urlfilter-regex|parse-(html|tika|metatags|headings)|index-(basic|anchor|metadata)|scoring-opic|urlnormalizer-(pass|regex|basic)</value>
<description>activates metatag parsing </description>
</property>
<property>
<name>headings</name>
<value>h1;h2</value>
<description>Comma separated list of headings to retrieve from the document</description>
</property>
<property>
<name>headings.multivalued</name>
<value>false</value>
<description>Whether to support multivalued headings.</description>
</property>
<property>
<name>index.parse.md</name>
<value>metatag.description,metatag.title, metatag.keywords, metatag.author,
metatag.author, headings.h1, headings.h2</value>
<description> Comma-separated list of keys to be taken from the parse metadata to generate fields. Can be used e.g. for 'description' or 'keywords' provided that these values are generated by a parser (see parse-metatags plugin)
</description>
</property>
can someone help?
Thanks Chris
Upvotes: 1
Views: 737
Reputation: 11
After struggeling with this myself I've found that the following should work (Apache Nutch 1.9):
<property>
<name>plugin.includes</name>
<value>protocol-http|headings|parse-(html|tika|metatags)|...</value>
</property>
<property>
<name>index.parse.md</name>
<value>h1,h2,h3</value>
</property>
<property>
<name>headings</name>
<value>h1,h2,h3</value>
</property>
<property>
<name>headings.multivalued</name>
<value>true</value>
</property>
The following should be added to your schema.xml file (when using Apache Solr):
<!-- fields for the headings plugin -->
<field name="h1" type="text" stored="true" indexed="true" multiValued="true"/>
<field name="h2" type="text" stored="true" indexed="true" multiValued="true"/>
<field name="h3" type="text" stored="true" indexed="true" multiValued="true"/>
Upvotes: 1
Reputation: 1
Within
<name>index.parse.md</name>
check for metatag.h1 and metatag.h2
<property>
<name>index.parse.md</name>
<value>metatag.h1,metatag.h2/value>
...
btw. Headings is no parse-... filter. You have to use
<name>plugin.includes</name>
<value>headings|parse-(html|tika|metatags)|...
Now it should work...
Upvotes: 0