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 arian487 <ak...@tagged.com> on 2011/06/02 20:30:59 UTC

Is there a way to get all the hits and score them later?

Basically I don't want the hits and the scores at the same time.  I want to
get a list of hits but I want to score them myself externally (there is a
dedicated server that will do the scoring given a list of id's).  Thanks!

--
View this message in context: http://lucene.472066.n3.nabble.com/Is-there-a-way-to-get-all-the-hits-and-score-them-later-tp3016424p3016424.html
Sent from the Solr - User mailing list archive at Nabble.com.

Re: Is there a way to get all the hits and score them later?

Posted by Jonathan Rochkind <ro...@jhu.edu>.
It sounds to me like maybe you want to implement a custom scoring 
algorithm in Solr?

I have no experience with that, but maybe if you ask and/or google using 
those words, you'll have more luck. I know it's possible to implement a 
custom scoring algorithm, but I believe it's kind of tricky, and also of 
course has performance implications depending on implementation -- and 
defintiely isn't designed for the use case of sending all results to an 
external server for scoring (not sure how you could do that in a 
performant way even if Solr's architecture would support it, which I'm 
not sure).

On 6/2/2011 3:01 PM, arian487 wrote:
> To clarify.  I want to do this all underneath solr.  I don't want to get a
> bunch of hits from solr in my app and then go to my server and score them
> again.  I'd like to score them myself underneath solr before I return the
> results to my app.
>
> --
> View this message in context: http://lucene.472066.n3.nabble.com/Is-there-a-way-to-get-all-the-hits-and-score-them-later-tp3016424p3016592.html
> Sent from the Solr - User mailing list archive at Nabble.com.
>

Re: Is there a way to get all the hits and score them later?

Posted by arian487 <ak...@tagged.com>.
To clarify.  I want to do this all underneath solr.  I don't want to get a
bunch of hits from solr in my app and then go to my server and score them
again.  I'd like to score them myself underneath solr before I return the
results to my app.

--
View this message in context: http://lucene.472066.n3.nabble.com/Is-there-a-way-to-get-all-the-hits-and-score-them-later-tp3016424p3016592.html
Sent from the Solr - User mailing list archive at Nabble.com.

Re: Is there a way to get all the hits and score them later?

Posted by Jonathan Rochkind <ro...@jhu.edu>.
Well, you can get all the hits by setting "rows" to a very high value, 
say a value one more than the total number of docs you have int he 
database, so all hits will be returned. If there are a lot of them, it 
won't be quick.

If you choose to sort by something other than 'score', I don't know if 
Solr will score anyway, not sure if there's a way to actually turn off 
scoring. But you can certainly ignore it.

Not sure if this is really what you were asking, it is a pretty simple 
answer.

On 6/2/2011 2:30 PM, arian487 wrote:
> Basically I don't want the hits and the scores at the same time.  I want to
> get a list of hits but I want to score them myself externally (there is a
> dedicated server that will do the scoring given a list of id's).  Thanks!
>
> --
> View this message in context: http://lucene.472066.n3.nabble.com/Is-there-a-way-to-get-all-the-hits-and-score-them-later-tp3016424p3016424.html
> Sent from the Solr - User mailing list archive at Nabble.com.
>

Re: Is there a way to get all the hits and score them later?

Posted by arian487 <ak...@tagged.com>.
Actually I was thinking I wanted to do something before the sharding (like in
the layer where faceting happens for example).  I wanna hack a plugin in the
middle to go to my server after I have a bunch of hits.  Just not sure where
to do this...

Though I've decided I can do scoring from solr (like a preliminary scoring
to narrow down some results) and then in the middle send those hits to my
server for additional scoring.  I can't hack it on in the end since the
sharding has happened I think, I'm just not sure where to look right now.

--
View this message in context: http://lucene.472066.n3.nabble.com/Is-there-a-way-to-get-all-the-hits-and-score-them-later-tp3016424p3017401.html
Sent from the Solr - User mailing list archive at Nabble.com.

Re: Is there a way to get all the hits and score them later?

Posted by arian487 <ak...@tagged.com>.
Hmm, looks like I can inherit the Similarity Class and do my own thing there. 

--
View this message in context: http://lucene.472066.n3.nabble.com/Is-there-a-way-to-get-all-the-hits-and-score-them-later-tp3016424p3018001.html
Sent from the Solr - User mailing list archive at Nabble.com.

Re: Is there a way to get all the hits and score them later?

Posted by Upayavira <uv...@odoko.co.uk>.
don't know if this is what you mean: you can add 'score' to the fl field
list, and it will show you the score for each item.

Upayavira

On Thu, 02 Jun 2011 11:30 -0700, "arian487" <ak...@tagged.com> wrote:
> Basically I don't want the hits and the scores at the same time.  I want
> to
> get a list of hits but I want to score them myself externally (there is a
> dedicated server that will do the scoring given a list of id's).  Thanks!
> 
> --
> View this message in context:
> http://lucene.472066.n3.nabble.com/Is-there-a-way-to-get-all-the-hits-and-score-them-later-tp3016424p3016424.html
> Sent from the Solr - User mailing list archive at Nabble.com.
> 
--- 
Enterprise Search Consultant at Sourcesense UK, 
Making Sense of Open Source