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 Mekin Maheshwari <me...@gmail.com> on 2007/05/22 13:42:43 UTC

Query norm for a function query ?

What does Query norm mean for a function query ?

>From the explain output:

  0.88247913 = (MATCH)
FunctionQuery(org.apache.solr.search.function.ReciprocalFloatFunction:500.0/(1.0*float(float(popularity
Rank))+500.0)), product of:
    0.998004 = 500.0/(1.0*float(float(popularityRank)=1.0)+500.0)
    1500.0 = boost
    5.8949605E-4 = queryNorm


QueryNorm is extremely low & that implies that I need a huge boost value for
my function query (I am already testing with a boost of 1500)
While its just a number to me & I can provide that value, I wanted to
understand the behaviour of queryNorm for function queries in general.

Thanks,
mekin


-- 
My Blog - http://mekin.livejournal.com/
My linkedin URL - http://www.linkedin.com/in/mekin

Re: Query norm for a function query ?

Posted by Yonik Seeley <yo...@apache.org>.
The query norm is just a way to balance clauses of different queries
(1/sqrt(sum of squares of  each clause weight) IIRC).  So a boost on
one clause causes the scores of other clauses to go down (because the
sum of squares is higher).

Your big boost *caused* the low queryNorm (but it will cause the
queryNorm of other clauses to be low as well).   If you put your
FunctionQuery in with other clauses in a boolean query, you should see
your FunctionQuery still contributing much more to the final score due
to the boost.

-Yonik


On 5/22/07, Mekin Maheshwari <me...@gmail.com> wrote:
> What does Query norm mean for a function query ?
>
> From the explain output:
>
>   0.88247913 = (MATCH)
> FunctionQuery(org.apache.solr.search.function.ReciprocalFloatFunction:500.0/(1.0*float(float(popularity
> Rank))+500.0)), product of:
>     0.998004 = 500.0/(1.0*float(float(popularityRank)=1.0)+500.0)
>     1500.0 = boost
>     5.8949605E-4 = queryNorm
>
>
> QueryNorm is extremely low & that implies that I need a huge boost value for
> my function query (I am already testing with a boost of 1500)
> While its just a number to me & I can provide that value, I wanted to
> understand the behaviour of queryNorm for function queries in general.
>
> Thanks,
> mekin