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 "Lassalle, Thibaut" <Th...@paris.fr> on 2009/08/24 16:21:56 UTC
solr nutch url indexing
Hi,
I would like to crawl intranets with nutch and index them with solr.
I would like to search mostly on the title of the pages (the one in
<title>This is a title</title>)
I tried to tweak the schema.xml to do that but nothing is working. I
just have the content indexed.
How do I index on title ?
Thanks
t.
Re: solr nutch url indexing
Posted by Uri Boness <ub...@gmail.com>.
Do you mean the schema or the solrconfig.xml?
The request handler is configured in the solrconfig.xml and you can find
out more about this particular configuration in
http://wiki.apache.org/solr/DisMaxRequestHandler?highlight=(CategorySolrRequestHandler)|((CategorySolrRequestHandler)).
To understand the schema better, you can read
http://wiki.apache.org/solr/SchemaXml
Uri
lasthib@gmail.com wrote:
> Uri Boness wrote:
>> Well... yes, it's a tool the Nutch ships with. It also ships with an
>> example Solr schema which you can use.
>
> hi,
> is there any documentation to understand what going in the schema ?
>
> <requestHandler name="/nutch" class="solr.SearchHandler" >
> <lst name="defaults">
> <str name="defType">dismax</str>
> <str name="echoParams">explicit</str>
> <float name="tie">0.01</float>
> <str name="qf">content0.5 anchor1.0 title5.2</str>
> <str name="pf">content0.5 anchor1.5 title5.2 site1.5</str>
> <str name="fl">url</str>
> <str name="mm">2<-1 5<-2 6<90%</str>
> <int name="ps">100</int>
> <bool hl="true"/>
> <str name="q.alt">*:*</str>
> <str name="hl.fl">title url content</str>
> <str name="f.title.hl.fragsize">0</str>
> <str name="f.title.hl.alternateField">title</str>
> <str name="f.url.hl.fragsize">0</str>
> <str name="f.url.hl.alternateField">url</str>
> <str name="f.content.hl.fragmenter">regex</str>
> </lst>
> </requestHandler>
>
Re: solr nutch url indexing
Posted by "lasthib@gmail.com" <la...@gmail.com>.
Uri Boness wrote:
> Well... yes, it's a tool the Nutch ships with. It also ships with an
> example Solr schema which you can use.
hi,
is there any documentation to understand what going in the schema ?
<requestHandler name="/nutch" class="solr.SearchHandler" >
<lst name="defaults">
<str name="defType">dismax</str>
<str name="echoParams">explicit</str>
<float name="tie">0.01</float>
<str name="qf">content0.5 anchor1.0 title5.2</str>
<str name="pf">content0.5 anchor1.5 title5.2 site1.5</str>
<str name="fl">url</str>
<str name="mm">2<-1 5<-2 6<90%</str>
<int name="ps">100</int>
<bool hl="true"/>
<str name="q.alt">*:*</str>
<str name="hl.fl">title url content</str>
<str name="f.title.hl.fragsize">0</str>
<str name="f.title.hl.alternateField">title</str>
<str name="f.url.hl.fragsize">0</str>
<str name="f.url.hl.alternateField">url</str>
<str name="f.content.hl.fragmenter">regex</str>
</lst>
</requestHandler>
Re: solr nutch url indexing
Posted by Uri Boness <ub...@gmail.com>.
Well... yes, it's a tool the Nutch ships with. It also ships with an
example Solr schema which you can use.
Fuad Efendi wrote:
> Thanks for the link, so, SolrIndex is NOT plugin, it is an application... I
> use similar approach...
>
> -----Original Message-----
> From: Uri Boness
> Hi,
>
> Nutch comes with support for Solr out of the box. I suggest you follow
> the steps as described here:
> http://www.lucidimagination.com/blog/2009/03/09/nutch-solr/
>
> Cheers,
> Uri
>
> Fuad Efendi wrote:
>
>> Is SolrIndex plugin for Nutch?
>> Thanks!
>>
>>
>>
>>
>
>
>
>
RE: solr nutch url indexing
Posted by Fuad Efendi <fu...@efendi.ca>.
Thanks for the link, so, SolrIndex is NOT plugin, it is an application... I
use similar approach...
-----Original Message-----
From: Uri Boness
Hi,
Nutch comes with support for Solr out of the box. I suggest you follow
the steps as described here:
http://www.lucidimagination.com/blog/2009/03/09/nutch-solr/
Cheers,
Uri
Fuad Efendi wrote:
> Is SolrIndex plugin for Nutch?
> Thanks!
>
>
>
Re: solr nutch url indexing
Posted by Uri Boness <ub...@gmail.com>.
Hi,
Nutch comes with support for Solr out of the box. I suggest you follow
the steps as described here:
http://www.lucidimagination.com/blog/2009/03/09/nutch-solr/
Cheers,
Uri
Fuad Efendi wrote:
> Is SolrIndex plugin for Nutch?
> Thanks!
>
>
> -----Original Message-----
> From: Uri Boness [mailto:uboness@gmail.com]
> Sent: August-24-09 4:42 PM
> To: solr-user@lucene.apache.org
> Subject: Re: solr nutch url indexing
>
> How did you configure nutch?
>
> Make sure you have the "parse-html" and "index-basic" configured. The
> HtmlParser should by default extract the page title and add to the
> parsed data, and the BasicIndexingFilter by default adds this title to
> the NutchDocument and stores it in the "title" filed. All the SolrIndex
> (actually the SolrWriter) does is converting the NuchDocument to a
> SolrInputDocument. So having these plugins configured in Nutch and
> having a field in the schema named "title" should work. (I'm assuming
> you're using the "solrindex" tool)
>
> Cheers,
> Uri
>
> Lassalle, Thibaut wrote:
>
>> Hi,
>>
>>
>>
>> I would like to crawl intranets with nutch and index them with solr.
>>
>>
>>
>> I would like to search mostly on the title of the pages (the one in
>> <title>This is a title</title>)
>>
>>
>>
>> I tried to tweak the schema.xml to do that but nothing is working. I
>> just have the content indexed.
>>
>>
>>
>> How do I index on title ?
>>
>>
>>
>> Thanks
>>
>> t.
>>
>>
>>
>>
>
>
>
>
RE: solr nutch url indexing
Posted by Fuad Efendi <fu...@efendi.ca>.
Is SolrIndex plugin for Nutch?
Thanks!
-----Original Message-----
From: Uri Boness [mailto:uboness@gmail.com]
Sent: August-24-09 4:42 PM
To: solr-user@lucene.apache.org
Subject: Re: solr nutch url indexing
How did you configure nutch?
Make sure you have the "parse-html" and "index-basic" configured. The
HtmlParser should by default extract the page title and add to the
parsed data, and the BasicIndexingFilter by default adds this title to
the NutchDocument and stores it in the "title" filed. All the SolrIndex
(actually the SolrWriter) does is converting the NuchDocument to a
SolrInputDocument. So having these plugins configured in Nutch and
having a field in the schema named "title" should work. (I'm assuming
you're using the "solrindex" tool)
Cheers,
Uri
Lassalle, Thibaut wrote:
> Hi,
>
>
>
> I would like to crawl intranets with nutch and index them with solr.
>
>
>
> I would like to search mostly on the title of the pages (the one in
> <title>This is a title</title>)
>
>
>
> I tried to tweak the schema.xml to do that but nothing is working. I
> just have the content indexed.
>
>
>
> How do I index on title ?
>
>
>
> Thanks
>
> t.
>
>
>
Re: solr nutch url indexing
Posted by Uri Boness <ub...@gmail.com>.
It seems to me that this configuration actually does what you want -
queries on "title" mostly. The default search field doesn't influence a
dismax query. I would suggest you to include the debugQuery=true
parameter, it will help you figure out how the matching is performed.
You can read more about dismax queries here:
http://wiki.apache.org/solr/DisMaxRequestHandler
Thibaut Lassalle wrote:
> Thanks for your help.
>
> I use the default Nutch configuration and I use solrindex to give the Nutch
> result to Solr. I have results when I query therefore Nutch works properly
> (it gives a url, title, content ...)
>
> I would like to query on Solr to emphase the "title" field and not the
> "content" field.
>
> Here is a sample of my "shema.xml"
>
> ..
> <uniqueKey>id</uniqueKey>
> <defaultSearchField>content</defaultSearchField>
> <solrQueryParser defaultOperator="AND"/>
> <copyField source="url" dest="id"/>
> ...
>
>
> Here is a sample of my "solrconfig.xml"
>
> <requestHandler name="/nutch" class="solr.SearchHandler" >
> <lst name="defaults">
> <str name="defType">dismax</str>
> <str name="echoParams">explicit</str>
> <float name="tie">0.01</float>
> <str name="qf">content^0.5 anchor^1.0 title^5.2</str>
> <str name="pf">content^0.5 anchor^1.5 title^5.2 site^1.5</str>
> <str name="fl">url</str>
> <str name="mm">2<-1 5<-2 6<90%</str>
> <int name="ps">100</int>
> <bool hl="true"/>
> <str name="q.alt">*:*</str>
> <str name="hl.fl">title url content</str>
> <str name="f.title.hl.fragsize">0</str>
> <str name="f.title.hl.alternateField">title</str>
> <str name="f.url.hl.fragsize">0</str>
> <str name="f.url.hl.alternateField">url</str>
> <str name="f.content.hl.fragmenter">regex</str>
> </lst>
> </requestHandler>
>
>
> This configuration query on "content" only.
> How to I change them to query mostly on "title" ?
>
> I tried to change "defaultSearchField" to "title" but it doesn't work.
>
> Where can I find doc on the "solr.SearchHandler" ?
>
> Thanks
> t.
>
>
Re: solr nutch url indexing
Posted by Thibaut Lassalle <la...@gmail.com>.
Thanks for your help.
I use the default Nutch configuration and I use solrindex to give the Nutch
result to Solr. I have results when I query therefore Nutch works properly
(it gives a url, title, content ...)
I would like to query on Solr to emphase the "title" field and not the
"content" field.
Here is a sample of my "shema.xml"
..
<uniqueKey>id</uniqueKey>
<defaultSearchField>content</defaultSearchField>
<solrQueryParser defaultOperator="AND"/>
<copyField source="url" dest="id"/>
...
Here is a sample of my "solrconfig.xml"
<requestHandler name="/nutch" class="solr.SearchHandler" >
<lst name="defaults">
<str name="defType">dismax</str>
<str name="echoParams">explicit</str>
<float name="tie">0.01</float>
<str name="qf">content^0.5 anchor^1.0 title^5.2</str>
<str name="pf">content^0.5 anchor^1.5 title^5.2 site^1.5</str>
<str name="fl">url</str>
<str name="mm">2<-1 5<-2 6<90%</str>
<int name="ps">100</int>
<bool hl="true"/>
<str name="q.alt">*:*</str>
<str name="hl.fl">title url content</str>
<str name="f.title.hl.fragsize">0</str>
<str name="f.title.hl.alternateField">title</str>
<str name="f.url.hl.fragsize">0</str>
<str name="f.url.hl.alternateField">url</str>
<str name="f.content.hl.fragmenter">regex</str>
</lst>
</requestHandler>
This configuration query on "content" only.
How to I change them to query mostly on "title" ?
I tried to change "defaultSearchField" to "title" but it doesn't work.
Where can I find doc on the "solr.SearchHandler" ?
Thanks
t.
Re: solr nutch url indexing
Posted by Uri Boness <ub...@gmail.com>.
How did you configure nutch?
Make sure you have the "parse-html" and "index-basic" configured. The
HtmlParser should by default extract the page title and add to the
parsed data, and the BasicIndexingFilter by default adds this title to
the NutchDocument and stores it in the "title" filed. All the SolrIndex
(actually the SolrWriter) does is converting the NuchDocument to a
SolrInputDocument. So having these plugins configured in Nutch and
having a field in the schema named "title" should work. (I'm assuming
you're using the "solrindex" tool)
Cheers,
Uri
Lassalle, Thibaut wrote:
> Hi,
>
>
>
> I would like to crawl intranets with nutch and index them with solr.
>
>
>
> I would like to search mostly on the title of the pages (the one in
> <title>This is a title</title>)
>
>
>
> I tried to tweak the schema.xml to do that but nothing is working. I
> just have the content indexed.
>
>
>
> How do I index on title ?
>
>
>
> Thanks
>
> t.
>
>
>