[ 
https://issues.apache.org/jira/browse/LUCENE-1260?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Robert Muir reopened LUCENE-1260:
---------------------------------


I think there are serious traps here, that if you supply Similarity to IWConfig 
etc rather than
 setting the global static Similarity.setDefault, your code will have no effect.

The biggest offendor can be seen in the patch:
{noformat}
      final float norm = docState.similarity.computeNorm(fieldInfo.name, 
fieldState);
-      norms[upto] = Similarity.encodeNorm(norm);
+      norms[upto] = Similarity.getDefault().encodeNormValue(norm);
{noformat}

shouldnt that simply call docState.similarity.encodeNormValue?

There are other problems with decode too.
I think we need to review all places where we use the static 
Similarity.getDefault() carefully.



> Norm codec strategy in Similarity
> ---------------------------------
>
>                 Key: LUCENE-1260
>                 URL: https://issues.apache.org/jira/browse/LUCENE-1260
>             Project: Lucene - Java
>          Issue Type: Improvement
>          Components: Search
>    Affects Versions: 2.3.1
>            Reporter: Karl Wettin
>            Assignee: Michael McCandless
>             Fix For: 4.0
>
>         Attachments: Lucene-1260-1.patch, Lucene-1260-2.patch, 
> Lucene-1260.patch, LUCENE-1260.txt, LUCENE-1260.txt, LUCENE-1260.txt
>
>
> The static span and resolution of the 8 bit norms codec might not fit with 
> all applications. 
> My use case requires that 100f-250f is discretized in 60 bags instead of the 
> default.. 10?

-- 
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: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to