page rank

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

page rank

David Xiao
Hello folks,

 

I am using solr to index web contents. I want to know is that possible to tell solr about rank information of contents?

For example, I give each content an integer number.

 

And I hope solr take this number into consideration when it generates search result. (larger number, more priority)

 

Best Regards,

David

Reply | Threaded
Open this post in threaded view
|

Re: page rank

dma_bamboo
Hi David.

Yes you can.

Just define a field as a slong type field:

<field name="numberField" type="slong" />

It can be used to sort (&sort=numberField desc) or to boost your score (it
will depend on the RequestHandler you are going to use).

In terms of score which RequestHandler are you planning to use?
    If using dismax you can define a boost function:
recip(rord(numberField),1,1000,1000)

I hope it helps.

Regards,
Daniel Alheiros

On 20/6/07 16:47, "David Xiao" <[hidden email]> wrote:

> Hello folks,
>
>  
>
> I am using solr to index web contents. I want to know is that possible to tell
> solr about rank information of contents?
>
> For example, I give each content an integer number.
>
>  
>
> And I hope solr take this number into consideration when it generates search
> result. (larger number, more priority)
>
>  
>
> Best Regards,
>
> David
>


http://www.bbc.co.uk/
This e-mail (and any attachments) is confidential and may contain personal views which are not the views of the BBC unless specifically stated.
If you have received it in error, please delete it from your system.
Do not use, copy or disclose the information in any way nor act in reliance on it and notify the sender immediately.
Please note that the BBC monitors e-mails sent or received.
Further communication will signify your consent to this.
                                       
Reply | Threaded
Open this post in threaded view
|

Re: page rank

Nick Jenkin-2
Also if you are using the standard request handler you can use the "val" hack:

foo:"bar" _val_:"recip(rord(numberField),1,1000,1000)"

You can find more info about this here:
http://wiki.apache.org/solr/FunctionQuery

-Nick

On 6/21/07, Daniel Alheiros <[hidden email]> wrote:

> Hi David.
>
> Yes you can.
>
> Just define a field as a slong type field:
>
> <field name="numberField" type="slong" />
>
> It can be used to sort (&sort=numberField desc) or to boost your score (it
> will depend on the RequestHandler you are going to use).
>
> In terms of score which RequestHandler are you planning to use?
>     If using dismax you can define a boost function:
> recip(rord(numberField),1,1000,1000)
>
> I hope it helps.
>
> Regards,
> Daniel Alheiros
>
> On 20/6/07 16:47, "David Xiao" <[hidden email]> wrote:
>
> > Hello folks,
> >
> >
> >
> > I am using solr to index web contents. I want to know is that possible to tell
> > solr about rank information of contents?
> >
> > For example, I give each content an integer number.
> >
> >
> >
> > And I hope solr take this number into consideration when it generates search
> > result. (larger number, more priority)
> >
> >
> >
> > Best Regards,
> >
> > David
> >
>
>
> http://www.bbc.co.uk/
> This e-mail (and any attachments) is confidential and may contain personal views which are not the views of the BBC unless specifically stated.
> If you have received it in error, please delete it from your system.
> Do not use, copy or disclose the information in any way nor act in reliance on it and notify the sender immediately.
> Please note that the BBC monitors e-mails sent or received.
> Further communication will signify your consent to this.
>
>
Reply | Threaded
Open this post in threaded view
|

RE: page rank

David Xiao
I have a few more questions base on your kindly replies to my first question.

1. My solr instance already indexed hundreds of thousands of documents, so how can I update these documents to add new field "numberField"

2. In runtime, my application might want to update value of "numberField" very frequency. How to achieve that via solr? Is that performance critical if many documents need to be updated?

3. Even I have check below wiki page for FunctionQuery, it is still not clear to me to understand this quoted words:
"
    > In terms of score which RequestHandler are you planning to use?
    >     If using dismax you can define a boost function:
    > recip(rord(numberField),1,1000,1000)
"
With it, how to let solr take into consideration of this numberField (kind of popularity factor)?
Would it be possible to give me an example please?


Best Regards,
David




-----Original Message-----
From: Nick Jenkin [mailto:[hidden email]]
Sent: Thursday, June 21, 2007 6:30 AM
To: [hidden email]
Subject: Re: page rank

Also if you are using the standard request handler you can use the "val" hack:

foo:"bar" _val_:"recip(rord(numberField),1,1000,1000)"

You can find more info about this here:
http://wiki.apache.org/solr/FunctionQuery

-Nick

On 6/21/07, Daniel Alheiros <[hidden email]> wrote:

> Hi David.
>
> Yes you can.
>
> Just define a field as a slong type field:
>
> <field name="numberField" type="slong" />
>
> It can be used to sort (&sort=numberField desc) or to boost your score (it
> will depend on the RequestHandler you are going to use).
>
> In terms of score which RequestHandler are you planning to use?
>     If using dismax you can define a boost function:
> recip(rord(numberField),1,1000,1000)
>
> I hope it helps.
>
> Regards,
> Daniel Alheiros
>
> On 20/6/07 16:47, "David Xiao" <[hidden email]> wrote:
>
> > Hello folks,
> >
> >
> >
> > I am using solr to index web contents. I want to know is that possible to tell
> > solr about rank information of contents?
> >
> > For example, I give each content an integer number.
> >
> >
> >
> > And I hope solr take this number into consideration when it generates search
> > result. (larger number, more priority)
> >
> >
> >
> > Best Regards,
> >
> > David
> >
>
>
> http://www.bbc.co.uk/
> This e-mail (and any attachments) is confidential and may contain personal views which are not the views of the BBC unless specifically stated.
> If you have received it in error, please delete it from your system.
> Do not use, copy or disclose the information in any way nor act in reliance on it and notify the sender immediately.
> Please note that the BBC monitors e-mails sent or received.
> Further communication will signify your consent to this.
>
>

Reply | Threaded
Open this post in threaded view
|

Re: page rank

Nick Jenkin-2
Hi David

1)  you will have to re-add the documents, solr does not support an
update operation (only add/del)

2) same as above, solr does not support an update operation, you will
need to re-add the document with the updated numberField, if its any
help I have a popularity field in my index (3 million documents) which
gets updated daily with no performance issues.

3) What query handler are you using, dismax or standard?
dismax is when you send keywords and a lucene query is generated
standard is when you create your own lucene query

-Nick

On 6/23/07, David Xiao <[hidden email]> wrote:

> I have a few more questions base on your kindly replies to my first question.
>
> 1. My solr instance already indexed hundreds of thousands of documents, so how can I update these documents to add new field "numberField"
>
> 2. In runtime, my application might want to update value of "numberField" very frequency. How to achieve that via solr? Is that performance critical if many documents need to be updated?
>
> 3. Even I have check below wiki page for FunctionQuery, it is still not clear to me to understand this quoted words:
> "
>     > In terms of score which RequestHandler are you planning to use?
>     >     If using dismax you can define a boost function:
>     > recip(rord(numberField),1,1000,1000)
> "
> With it, how to let solr take into consideration of this numberField (kind of popularity factor)?
> Would it be possible to give me an example please?
>
>
> Best Regards,
> David
>
>
>
>
> -----Original Message-----
> From: Nick Jenkin [mailto:[hidden email]]
> Sent: Thursday, June 21, 2007 6:30 AM
> To: [hidden email]
> Subject: Re: page rank
>
> Also if you are using the standard request handler you can use the "val" hack:
>
> foo:"bar" _val_:"recip(rord(numberField),1,1000,1000)"
>
> You can find more info about this here:
> http://wiki.apache.org/solr/FunctionQuery
>
> -Nick
>
> On 6/21/07, Daniel Alheiros <[hidden email]> wrote:
> > Hi David.
> >
> > Yes you can.
> >
> > Just define a field as a slong type field:
> >
> > <field name="numberField" type="slong" />
> >
> > It can be used to sort (&sort=numberField desc) or to boost your score (it
> > will depend on the RequestHandler you are going to use).
> >
> > In terms of score which RequestHandler are you planning to use?
> >     If using dismax you can define a boost function:
> > recip(rord(numberField),1,1000,1000)
> >
> > I hope it helps.
> >
> > Regards,
> > Daniel Alheiros
> >
> > On 20/6/07 16:47, "David Xiao" <[hidden email]> wrote:
> >
> > > Hello folks,
> > >
> > >
> > >
> > > I am using solr to index web contents. I want to know is that possible to tell
> > > solr about rank information of contents?
> > >
> > > For example, I give each content an integer number.
> > >
> > >
> > >
> > > And I hope solr take this number into consideration when it generates search
> > > result. (larger number, more priority)
> > >
> > >
> > >
> > > Best Regards,
> > >
> > > David
> > >
> >
> >
> > http://www.bbc.co.uk/
> > This e-mail (and any attachments) is confidential and may contain personal views which are not the views of the BBC unless specifically stated.
> > If you have received it in error, please delete it from your system.
> > Do not use, copy or disclose the information in any way nor act in reliance on it and notify the sender immediately.
> > Please note that the BBC monitors e-mails sent or received.
> > Further communication will signify your consent to this.
> >
> >
>
>