You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@nutch.apache.org by jeff gelb <jg...@pearsoncmg.com> on 2007/11/08 19:11:22 UTC

search custom field with search.jsp

Hey, all:

I've looked at the mailing list archives and followed what I think 
should work, but I can't seem to get any results when I'm searching on 
anything other than the default field (content?) using search.jsp.

This is with Nutch 0.9.

Per the plugin writing example, I created a parsing filter and indexing 
filter, and I can see from my crawl logs and from Luke that my filters 
are being used by Nutch, my field is being found during the crawl/index 
phase, and it is in the lucene index with the expected values.

I created a query filter and passed my field name and a positive boost 
value in call to the parent's constructor.   My query filter appears to 
be loaded at search time -- my logs have the message from my query 
filter's constructor.

It seems like I should be able to search on my field using the syntax 
fieldname:value.  I've tried that by itself as well as with an 
additional content term that I know gives results, and I've tried it as 
the first and last search term, all with no luck.

Any suggestions?

Thx.

-- jeff

Re: search custom field with search.jsp

Posted by jgelb <jg...@pearsoncmg.com>.
I got this working.

It turned out to be a combination of a stale version of my plugin.xml
and then a misconfig that I finally dug up out of the mailing list archives.

For reference, if the query filter extends FieldQueryFilter, then the
plugin.xml section for the filter should have a parameter named "fields"
with a value set to your fieldname.  This is how the query filter
example is set up in the writing plugins doc.

If you extend RawFieldQueryFilter, then the parameter needs to be named
"raw-fields".

In any case, works nicely now, and I can move on to banging my head
against other problems. :-)

Thx.

-- jeff




Jasper Kamperman wrote:
> I'm not sure, but this sounds a lot like the problem that is solved
> here: https://issues.apache.org/jira/browse/NUTCH-563
> On Nov 8, 2007, at 10:11 AM, jeff gelb wrote:
> 
>> Hey, all:
>>
>> I've looked at the mailing list archives and followed what I think
>> should work, but I can't seem to get any results when I'm searching on
>> anything other than the default field (content?) using search.jsp.
>>
>> This is with Nutch 0.9.
>>
>> Per the plugin writing example, I created a parsing filter and
>> indexing filter, and I can see from my crawl logs and from Luke that
>> my filters are being used by Nutch, my field is being found during the
>> crawl/index phase, and it is in the lucene index with the expected
>> values.
>>
>> I created a query filter and passed my field name and a positive boost
>> value in call to the parent's constructor.   My query filter appears
>> to be loaded at search time -- my logs have the message from my query
>> filter's constructor.
>>
>> It seems like I should be able to search on my field using the syntax
>> fieldname:value.  I've tried that by itself as well as with an
>> additional content term that I know gives results, and I've tried it
>> as the first and last search term, all with no luck.
>>
>> Any suggestions?
>>
>> Thx.
>>
>> -- jeff
>>
> 
> 


Re: search custom field with search.jsp

Posted by Jasper Kamperman <ja...@openwaternet.com>.
I'm not sure, but this sounds a lot like the problem that is solved  
here: https://issues.apache.org/jira/browse/NUTCH-563
On Nov 8, 2007, at 10:11 AM, jeff gelb wrote:

> Hey, all:
>
> I've looked at the mailing list archives and followed what I think  
> should work, but I can't seem to get any results when I'm searching  
> on anything other than the default field (content?) using search.jsp.
>
> This is with Nutch 0.9.
>
> Per the plugin writing example, I created a parsing filter and  
> indexing filter, and I can see from my crawl logs and from Luke  
> that my filters are being used by Nutch, my field is being found  
> during the crawl/index phase, and it is in the lucene index with  
> the expected values.
>
> I created a query filter and passed my field name and a positive  
> boost value in call to the parent's constructor.   My query filter  
> appears to be loaded at search time -- my logs have the message  
> from my query filter's constructor.
>
> It seems like I should be able to search on my field using the  
> syntax fieldname:value.  I've tried that by itself as well as with  
> an additional content term that I know gives results, and I've  
> tried it as the first and last search term, all with no luck.
>
> Any suggestions?
>
> Thx.
>
> -- jeff
>