You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@nutch.apache.org by Enrico Triolo <en...@gmail.com> on 2006/02/02 16:54:30 UTC
Re: Problem with plugins
I managed to make it work with nutch apis, but without using the Query.parse()
method:
Query q = new Query();
q.addRequiredPhrase(new String[] {"a3d32ce0cae0da47677f30cc6182d421"},
"quiewId");
Could it be a bug in the Query.parse method?
Enrico
On 1/31/06, Enrico Triolo <en...@gmail.com> wrote:
>
> I tried both: added boost value and searched without the "quiewId:"
> part... Nothing changed...
> I know it must be something really stupid! :-(
>
> As I said before I managed to make it work with the lucene apis... I'm new
> to the nutch world, but can you explain me why should I prefer using nutch
> apis?
>
> Thank you soooooooooo much!
>
> Enrico
>
> On 1/31/06, Vanderdray, Jacob <JV...@aarp.org> wrote:
> >
> > One other note: with the fields set to DEFAULT, you'll want to
> > just query for "a3d32ce0cae0da47677f30cc6182d421" instead of
> > "quiewId:a3d32ce0cae0da47677f30cc6182d421".
> >
> > Jake.
> >
> > -----Original Message-----
> > From: Vanderdray, Jacob [mailto:JVanderdray@aarp.org]
> > Sent: Tuesday, January 31, 2006 11:07 AM
> > To: nutch-user@lucene.apache.org
> > Subject: RE: Problem with plugins
> >
> > Ok. One more change...In your query filter change this:
> >
> > public QuiewQueryFilter() {
> > super("quiewId");
> >
> > To:
> >
> > public QuiewQueryFilter() {
> > super("quiewId", 1f);
> >
> > I also ran into an issue where not passing a boost value for the field
> > caused it not to work.
> >
> > Jake.
> >
> > -----Original Message-----
> > From: Enrico Triolo [mailto:enrico.triolo@gmail.com]
> > Sent: Tuesday, January 31, 2006 10:52 AM
> > To: nutch-user@lucene.apache.org
> > Subject: Re: Problem with plugins
> >
> > Thank you, I forgot this little particular... :-)
> > Anyway it still doesn't work! I keep getting 0 hits...
> >
> > Here's the modified plugin.xml (I tried both with fields="quiewId" and
> > fields="DEFAULT"):
> >
> > <?xml version="1.0" encoding="UTF-8"?>
> > <plugin
> > id="query-quiew"
> > name="Quiew Query Filter"
> > version="1.0.0"
> > provider-name="nutch.org">
> >
> > <extension-point
> > id="org.apache.nutch.searcher.QueryFilter"
> > name="Nutch Query Filter"/>
> >
> > <runtime>
> > <library name="query-quiew.jar">
> > <export name="*"/>
> > </library>
> > </runtime>
> >
> >
> > <extension id="org.apache.nutch.searcher.quiew "
> > name="Nutch URL Query Filter"
> > point="org.apache.nutch.searcher.QueryFilter">
> > <implementation id="QuiewQueryFilter"
> > class="
> > org.apache.nutch.searcher.quiew.QuiewQueryFilter"
> > fields="DEFAULT"/>
> > </extension>
> >
> > </plugin>
> >
> >
> > On 1/31/06, Vanderdray, Jacob < JVanderdray@aarp.org> wrote:
> > >
> > > In the plugin.xml file bellow, try changing:
> > >
> > > <implementation id="URLQueryFilter"
> > > class="
> > > org.apache.nutch.searcher.quiew.QuiewQueryFilter "
> > > fields="url"/>
> > >
> > > To:
> > >
> > > <implementation id="URLQueryFilter"
> > > class="
> > > org.apache.nutch.searcher.quiew.QuiewQueryFilter "
> > > fields="quiewId"/>
> > >
> > > That should tell the searcher to use your plugin to search
> > > against the quiewId field. If that still doesn't work quite the way
> > you
> > > want try setting fields to DEFAULT. That should cause it to run all
> > > queries through your filter even if quiewId:[term] isn't specified.
> > >
> > > I ran into the same issue myself and I'm still trying to fully
> >
> > > understand how the filters end up getting called.
> > >
> > > Jake.
> > >
> > > ---------------- Query plugin ----------------------
> > > <?xml version="1.0" encoding="UTF-8"?>
> > > <plugin
> > > id="query-quiew"
> > > name="Quiew Query Filter"
> > > version="1.0.0"
> > > provider-name="nutch.org">
> > >
> > > <extension-point
> > > id="org.apache.nutch.searcher.QueryFilter"
> > > name="Nutch Query Filter"/>
> > >
> > > <runtime>
> > > <library name=" query-quiew.jar">
> > > <export name="*"/>
> > > </library>
> > > </runtime>
> > >
> > >
> > > <extension id="org.apache.nutch.searcher.quiew.QuiewQueryFilter "
> > > name="Nutch URL Query Filter"
> > > point="org.apache.nutch.searcher.QueryFilter">
> > > <implementation id="URLQueryFilter"
> > > class="
> > > org.apache.nutch.searcher.quiew.QuiewQueryFilter"
> > > fields="url"/>
> > > </extension>
> > >
> > > </plugin>
> > >
> > >
> > >
> >
>
>