lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Marvin Humphrey (JIRA)" <j...@apache.org>
Subject [jira] Commented: (LUCENE-1896) Modify confusing javadoc for queryNorm
Date Tue, 08 Sep 2009 16:07:57 GMT

    [ https://issues.apache.org/jira/browse/LUCENE-1896?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12752591#action_12752591
] 

Marvin Humphrey commented on LUCENE-1896:
-----------------------------------------

> at what I am trusting is essentially no cost.

Here's the snippet from TermQuery.score() where queryNorm() actually 
gets applied to each document's score:

{code}
float raw =                                   // compute tf(f)*weight
  f < SCORE_CACHE_SIZE                        // check cache
  ? scoreCache[f]                             // cache hit
  : getSimilarity().tf(f)*weightValue;        // cache miss
{code}

At this point, queryNorm() has already been factored into weightValue (and
scoreCache).  It happens during setup. You can either scale weightValue by
queryNorm() during setup or not -- the per-document computational cost is 
unaffected.

> Modify confusing javadoc for queryNorm
> --------------------------------------
>
>                 Key: LUCENE-1896
>                 URL: https://issues.apache.org/jira/browse/LUCENE-1896
>             Project: Lucene - Java
>          Issue Type: Improvement
>          Components: Javadocs
>            Reporter: Jiri Kuhn
>            Priority: Minor
>             Fix For: 2.9
>
>
> See http://markmail.org/message/arai6silfiktwcer
> The javadoc confuses me as well.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: java-dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-dev-help@lucene.apache.org


Mime
View raw message