Hello,
Following the info available on the wiki
(http://wiki.apache.org/nutch/CreateNewFilter), I have created two new
plugins:
- index-scope (based on index-more)
- query-scope (based on query-site)
As you can guess, the first plugin simply add the "scope" metadata to
every parsed document, giving them, as a test, a fixed value, while the
second plugin add the possibility to search for a "scope" using the
Lucene syntax.
I have deploy the two new plugins, as JARS, in my plugins repository and
modified my nutch-site.xml file to look for them. To be sure of
everything I have performed a complete crawling of a "virgin" source. I
have also modified both plugin.xml files so that the system can find the
right java classes.
Looking at a resultset everything looks fine: every hit in the set
possesses the metadata scope=aScope, which is exactly what I am looking
for. Things stop working though when I try to search for the metadata
using the Lucene syntax. The query "aWord scope:aScope" returns
nothing...
When I check at my log files I can see that the query-scope plugin is
available:
[...]
2008-03-25 16:02:55,015 [http-8080-Processor23] INFO
org.apache.nutch.plugin.PluginRepository - Scope Query Filter
(query-scope)
[...]
And that the proper extension point is registered:
[...]
2008-03-25 16:02:55,015 [http-8080-Processor23] INFO
org.apache.nutch.plugin.PluginRepository - Nutch Query Filter
(org.apache.nutch.searcher.QueryFilter)
[...]
Here is the plugin.xml file associated with the plugin:
<plugin
id="query-scope"
name="a description"
version="1.0.0"
provider-name="myName.xyz">
<runtime>
<library name="query-scope.jar">
<export name="*"/>
</library>
</runtime>
<requires>
<import plugin="nutch-extensionpoints"/>
</requires>
<extension
id="org.apache.nutch.searcher.site.modified.SiteQueryFilterModified"
name="Scope Query Filter"
point="org.apache.nutch.searcher.QueryFilter">
<implementation id="SiteQueryFilterModified"
class="org.apache.nutch.searcher.site.modified.SiteQueryFilterModified">
<parameter name="raw-fields" value="scope"/>
</implementation>
</extension>
</plugin>
If somebody has any idea... please let me know! Thank you in advance!
David