[ 
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-unsubscr...@lucene.apache.org
For additional commands, e-mail: java-dev-h...@lucene.apache.org

Reply via email to