SpanQuery scoring seems different

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

SpanQuery scoring seems different

Cedric Ho
Hi all,

It seems that SpanNearQuery doesn't consider the boosting of the nested terms:

  1.3333334 = (MATCH) weight(spanNear([content2MBM:morgan^4.0,
content2MBM:stanley^4.0], 2, true) in 11976), product of:
    2.0 = queryWeight(spanNear([content2MBM:morgan^4.0,
content2MBM:stanley^4.0], 2, true)), product of:
      2.0 = idf(content2MBM: morgan=13 stanley=4)
      1.0 = queryNorm
    0.6666667 = (MATCH) fieldWeight(content2MBM:spanNear([morgan^4.0,
stanley^4.0], 2, true) in 11976), product of:
      0.33333334 = tf(phraseFreq=0.33333334)
      2.0 = idf(content2MBM: morgan=13 stanley=4)
      1.0 = fieldNorm(field=content2MBM, doc=11976)


with a BooleanQuery the boosting is included in the score calculation

    ....
    4.0 = (MATCH) weight(content2MBM:stanley^4.0 in 11976), product of:
      4.0 = queryWeight(content2MBM:stanley^4.0), product of:
        4.0 = boost                 /* This Line is what I want */
        1.0 = idf(docFreq=4, numDocs=45619)
        1.0 = queryNorm
      1.0 = (MATCH) fieldWeight(content2MBM:stanley in 11976), product of:
        1.0 = tf(termFreq(content2MBM:stanley)=1)
        1.0 = idf(docFreq=4, numDocs=45619)
        1.0 = fieldNorm(field=content2MBM, doc=11976)

I previously assume boost is calculated in all queries.
I am using 2.3.0.

Cedric

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: SpanQuery scoring seems different

Cedric Ho
And I just found an old jira issue which might explain this behavior

LUCENE-533
http://www.archivum.info/java-dev@.../2006-03/msg00265.html

Cedric


On Wed, Apr 2, 2008 at 3:15 PM, Cedric Ho <[hidden email]> wrote:

> Hi all,
>
>  It seems that SpanNearQuery doesn't consider the boosting of the nested terms:
>
>   1.3333334 = (MATCH) weight(spanNear([content2MBM:morgan^4.0,
>  content2MBM:stanley^4.0], 2, true) in 11976), product of:
>     2.0 = queryWeight(spanNear([content2MBM:morgan^4.0,
>  content2MBM:stanley^4.0], 2, true)), product of:
>       2.0 = idf(content2MBM: morgan=13 stanley=4)
>       1.0 = queryNorm
>     0.6666667 = (MATCH) fieldWeight(content2MBM:spanNear([morgan^4.0,
>  stanley^4.0], 2, true) in 11976), product of:
>       0.33333334 = tf(phraseFreq=0.33333334)
>       2.0 = idf(content2MBM: morgan=13 stanley=4)
>       1.0 = fieldNorm(field=content2MBM, doc=11976)
>
>
>  with a BooleanQuery the boosting is included in the score calculation
>
>     ....
>     4.0 = (MATCH) weight(content2MBM:stanley^4.0 in 11976), product of:
>       4.0 = queryWeight(content2MBM:stanley^4.0), product of:
>         4.0 = boost                 /* This Line is what I want */
>         1.0 = idf(docFreq=4, numDocs=45619)
>         1.0 = queryNorm
>       1.0 = (MATCH) fieldWeight(content2MBM:stanley in 11976), product of:
>         1.0 = tf(termFreq(content2MBM:stanley)=1)
>         1.0 = idf(docFreq=4, numDocs=45619)
>         1.0 = fieldNorm(field=content2MBM, doc=11976)
>
>  I previously assume boost is calculated in all queries.
>  I am using 2.3.0.
>
>  Cedric
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]