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 crisfromnova <cr...@gmail.com> on 2011/09/09 13:49:04 UTC

scoring only by higher boost

Hi,

For my search I want to calculate the score only by higher boost. For
example:
doc1
<doc>
  <name>Charlie</name>
  <surname>Jonhson</surname>
</doc>
doc2
<doc>
  <name>Charlie</name>
  <surname>Charlie</surname>
</doc>

So when I use the query : "q=name:Charlie^5 surname:Charlie^2", I want that
both documents to have the same score, based on the boost value of the first
field matched.

I use a custom Similarity class and I overwrite all methods wich can
influence the score(computenorm(...), tf(...), idf(...), queryNorm(...)),
but I don't know how to change the score to take in consideration only the
higher boost value and not the sum of bossts from all matched fields.

Any idea, please...

 

--
View this message in context: http://lucene.472066.n3.nabble.com/scoring-only-by-higher-boost-tp3322666p3322666.html
Sent from the Solr - User mailing list archive at Nabble.com.

Re: scoring only by higher boost

Posted by Jamie Johnson <je...@gmail.com>.
No problem, occasionally a blind squirrel finds a nut :)

On Fri, Sep 9, 2011 at 8:46 AM, crisfromnova <cr...@gmail.com> wrote:
> It works with dismax.
> Thank you very much!!
>
> --
> View this message in context: http://lucene.472066.n3.nabble.com/scoring-only-by-higher-boost-tp3322666p3322800.html
> Sent from the Solr - User mailing list archive at Nabble.com.
>

Re: scoring only by higher boost

Posted by crisfromnova <cr...@gmail.com>.
It works with dismax.
Thank you very much!!

--
View this message in context: http://lucene.472066.n3.nabble.com/scoring-only-by-higher-boost-tp3322666p3322800.html
Sent from the Solr - User mailing list archive at Nabble.com.

Re: scoring only by higher boost

Posted by Jamie Johnson <je...@gmail.com>.
I could be wrong, but isn't that what edismax does?

http://lucene.apache.org/java/3_0_0/api/core/org/apache/lucene/search/DisjunctionMaxQuery.html

On Fri, Sep 9, 2011 at 7:49 AM, crisfromnova <cr...@gmail.com> wrote:
> Hi,
>
> For my search I want to calculate the score only by higher boost. For
> example:
> doc1
> <doc>
>  <name>Charlie</name>
>  <surname>Jonhson</surname>
> </doc>
> doc2
> <doc>
>  <name>Charlie</name>
>  <surname>Charlie</surname>
> </doc>
>
> So when I use the query : "q=name:Charlie^5 surname:Charlie^2", I want that
> both documents to have the same score, based on the boost value of the first
> field matched.
>
> I use a custom Similarity class and I overwrite all methods wich can
> influence the score(computenorm(...), tf(...), idf(...), queryNorm(...)),
> but I don't know how to change the score to take in consideration only the
> higher boost value and not the sum of bossts from all matched fields.
>
> Any idea, please...
>
>
>
> --
> View this message in context: http://lucene.472066.n3.nabble.com/scoring-only-by-higher-boost-tp3322666p3322666.html
> Sent from the Solr - User mailing list archive at Nabble.com.
>