You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-user@lucene.apache.org by Savannah Beckett <sa...@yahoo.com> on 2010/08/26 04:38:07 UTC

How to set custom fields for SolrSearchBean Query in Nutch?

I am using SolrSearchBean inside my custom parse filter in Nutch 1.1.  My 
solr/nutch setup is working.  I have Nutch to crawl and index into Solr and I am 
able to search solr index with my solr admin page.  My solr schema is completely 
different than the one in Nutch.  When I tried to query my solr index using 
SolrSearchBean, it somehow always treat my query with fields like content, site, 
url, etc, my solr index has none of those fields.  Of course, there is an 
exception complaining cannot executing query.  


How do I make SolrSearchBean use my solr setup's fields instead of nutch ones?  
Thanks.


      

Re: How to set custom fields for SolrSearchBean Query in Nutch?

Posted by Savannah Beckett <sa...@yahoo.com>.
the search function in SolrSearchBean take Query as parameter.  When I keep 
plugin query-basic enabled, the query always has content, url, etc as query 
fields which my solr setup never uses.  If I disable query-basic and use only 
query-custom, it generates error because it doesn't recognize "DEFAULT" field. 
 Does anyone use how to get around this? 

Thanks. 




________________________________
From: Birger Lie <bi...@gmail.com>
To: user@nutch.apache.org
Sent: Thu, August 26, 2010 12:02:15 AM
Subject: Re: How to set custom fields for SolrSearchBean Query in Nutch?

To configure the different fields etc to search on - se theSolrConfig.xml 
you can tailor matching on fields and fields weights + rank profiles....you can 
also configure different requests.. 


try using the dismax handler for your searches...(most control) 

http://wiki.apache.org/solr/DisMaxQParserPlugin


- Birger


On Aug 26, 2010, at 4:38 AM, Savannah Beckett wrote:

> I am using SolrSearchBean inside my custom parse filter in Nutch 1.1.  My 
> solr/nutch setup is working.  I have Nutch to crawl and index into Solr and I 
>am 
>
> able to search solr index with my solr admin page.  My solr schema is 
>completely 
>
> different than the one in Nutch.  When I tried to query my solr index using 
> SolrSearchBean, it somehow always treat my query with fields like content, 
>site, 
>
> url, etc, my solr index has none of those fields.  Of course, there is an 
> exception complaining cannot executing query.  
> 
> 
> How do I make SolrSearchBean use my solr setup's fields instead of nutch ones?  
>
> Thanks.
> 
> 


      

Re: How to set custom fields for SolrSearchBean Query in Nutch?

Posted by Birger Lie <bi...@gmail.com>.
To configure the different fields etc to search on - se theSolrConfig.xml 
you can tailor matching on fields and fields weights + rank profiles....you can also configure different requests.. 

try using the dismax handler for your searches...(most control) 

http://wiki.apache.org/solr/DisMaxQParserPlugin


- Birger


On Aug 26, 2010, at 4:38 AM, Savannah Beckett wrote:

> I am using SolrSearchBean inside my custom parse filter in Nutch 1.1.  My 
> solr/nutch setup is working.  I have Nutch to crawl and index into Solr and I am 
> able to search solr index with my solr admin page.  My solr schema is completely 
> different than the one in Nutch.  When I tried to query my solr index using 
> SolrSearchBean, it somehow always treat my query with fields like content, site, 
> url, etc, my solr index has none of those fields.  Of course, there is an 
> exception complaining cannot executing query.  
> 
> 
> How do I make SolrSearchBean use my solr setup's fields instead of nutch ones?  
> Thanks.
> 
>