I think we need more information about your particular requirement the example
that you described was more about to boost the home page of a given site, if
you want to boost the Solr documents that match a known set of terms this could
be implemented in Solr, either by boosting the particular terms in a particular
field or by boosting a match on a given field (i.e url, host, etc.) If you are
boosting the seed URLs (which usually are homepages) you could set the
nutch.score metadata on the seed file.
If you want more complex logic, for instance if the URL matchs a given regex
pattern, you'll need to implement a custom scoring plugin that adds your own
custom boost, overriding the indexerScore method, which will allow you to
modify the boost field in the Solr document.
public float indexerScore(Text url, NutchDocument doc, CrawlDatum dbDatum,
CrawlDatum fetchDatum, Parse parse, Inlinks inlinks, float initScore)
throws ScoringFilterException;
The main advantage of handling your scoring on the Solr side is that allows to
be query-overwritable, which is very handy to do A/B testing, for instance,
tweaking your relevancy function.
Regards,
----- Mensaje original -----
De: "Manish Verma" <[email protected]>
Para: [email protected]
Enviados: Lunes, 25 de Enero 2016 13:33:32
Asunto: [MASSMAIL]Re: Adding Weightage To URLs Matching Some Patteren
No crawling priorities its about we have some urls which we want to show first
in search result given when there is case that the search term is available in
our priority urls and other urls.
Thanks
Manish Verma
> On Jan 25, 2016, at 4:40 AM, Markus Jelsma <[email protected]> wrote:
>
> Hi - i understand but preference on what? Crawling priorities? Search
> relevance?
> Markus
>
> -----Original message-----
>> From:Manish Verma <[email protected]>
>> Sent: Monday 25th January 2016 2:09
>> To: [email protected]
>> Subject: Re: Adding Weightage To URLs Matching Some Patteren
>>
>> Reason is we want to give some urls preference over others.
>>
>> Thanks
>> Manish Verma
>>
>>
>>> On Jan 21, 2016, at 12:54 PM, Markus Jelsma <[email protected]
>>> <mailto:[email protected]>> wrote:
>>>
>>> Hello Manish - Nutch does not directly support such as feature out of the
>>> box, but you could add something like this via a custom scoring filter, see
>>> the scoring filter interface and implementors for examples. But, why do you
>>> need this? There is a good chance you might not need it.
>>>
>>> Markus
>>>
>>> -----Original message-----
>>>> From:Manish Verma <[email protected] <mailto:[email protected]>>
>>>> Sent: Thursday 21st January 2016 21:42
>>>> To: [email protected] <mailto:[email protected]>
>>>> Subject: Adding Weightage To URLs Matching Some Patteren
>>>>
>>>> Hi,
>>>>
>>>> I am using notch 1.10 and want to add some weightage to Urls based on some
>>>> Url patteren . For example if the Url is matching some Url pattern then
>>>> will add more weightage.
>>>> Do we already have some in Nutch 1.10
>>>>
>>>> Thanks Manish
>>>>
>>>>
>>
>>