I have seen this question being asked multiple times in this forum. However
this has confused me more because each has its own approach to solving the
issue and no one has outlined the steps in one place. The tutorials seem to
be a bit outdated too.

The version of Nutch I am using is 0.9.

I have 3 custom fields that I have added via an IndexingFilter. The fields
are: author, title and description. I now intend to provide support for
querying these fields as:
author:Gautham
title:Nutch
etc.

I added an Author class as follows:

public class Author extends RawFieldQueryFilter {
        private Configuration conf;

        public Author() {
                super("author", 5f);
        }

        public void setConf(Configuration conf) {
                this.conf = conf;
        }

        public Configuration getConf() {
                return this.conf;
        }
}

and made an entry in plugin.xml as:

 <extension id="query.Author"
              name="Author"
              point="org.apache.nutch.searcher.QueryFilter">
      <implementation id="Author"
                      class="query.Author">
             <parameter name="fields" value="author"/>
      </implementation>
   </extension>

When I use NutchBean to perform the query, I see no results. I also tried
changing this to RawFieldQueryFilter to QueryFilter and following the
approach used in the query-more plugin. It does not seem to work either.

The questions I have specifically are:
* Do I need to create one class per custom field that I intend to provide
support for query?
* Should I use RawFieldQueryFilter or QueryFilter?
* Should I make an entry as: <parameter name="fields" value="author"/> or
<parameter name="fields" value="DEFAULT"/> in plugin.xml?

Any help or pointers is greatly appreciated.

Thanks,
Gautham.
-- 
View this message in context: 
http://www.nabble.com/Custom-field-query-tf4596454.html#a13123141
Sent from the Nutch - User mailing list archive at Nabble.com.

Reply via email to