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 William Pierce <ev...@hotmail.com> on 2009/10/13 17:35:41 UTC

Dynamically compute document scores...

Folks:

During query time, I want to dynamically compute a document score as 
follows:

   a) Take the SOLR score for the document -- call it S.
   b) Lookup the "business logic" score for this document.  Call it L.
   c) Compute a new score T = func(S, L)
   d) Return the documents sorted by T.

I have looked at function queries but in my limited/quick review of it,  I 
could not see a quick way of doing this.

Is this possible?

Thanks,

- Bill
 


Re: Dynamically compute document scores...

Posted by Chris Hostetter <ho...@fucit.org>.
: References: <4A...@umich.edu>
:     <69...@mail.gmail.com>
:     <4A...@umich.edu>
:     <Pi...@radix.cryptio.net>
:     <4A...@umich.edu> <SN...@phx.gbl>
:      <SN...@phx.gbl>
:     <87...@mail.gmail.com>
:     <SN...@phx.gbl>
: In-Reply-To: <SN...@phx.gbl>
: Subject: Dynamically compute document scores...

http://people.apache.org/~hossman/#threadhijack
Thread Hijacking on Mailing Lists

When starting a new discussion on a mailing list, please do not reply to 
an existing message, instead start a fresh email.  Even if you change the 
subject line of your email, other mail headers still track which thread 
you replied to and your question is "hidden" in that thread and gets less 
attention.   It makes following discussions in the mailing list archives 
particularly difficult.
See Also:  http://en.wikipedia.org/wiki/Thread_hijacking





-Hoss


Re: Dynamically compute document scores...

Posted by Avlesh Singh <av...@gmail.com>.
Options -

   1. Can you pre-compute your "business logic" score at index time? If yes,
   then this value can be stored in some field and you can use function queries
   to use this data plus the score to return a value which you can sort upon.
   2. Take a look at -
   http://lucene.apache.org/java/2_2_0/api/org/apache/lucene/search/Similarity.html.
   Custom similarity implementations can be hooked up into Solr easily.

Cheers
Avlesh

On Tue, Oct 13, 2009 at 9:05 PM, William Pierce <ev...@hotmail.com>wrote:

> Folks:
>
> During query time, I want to dynamically compute a document score as
> follows:
>
>  a) Take the SOLR score for the document -- call it S.
>  b) Lookup the "business logic" score for this document.  Call it L.
>  c) Compute a new score T = func(S, L)
>  d) Return the documents sorted by T.
>
> I have looked at function queries but in my limited/quick review of it,  I
> could not see a quick way of doing this.
>
> Is this possible?
>
> Thanks,
>
> - Bill
>
>
>