You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "Sascha Markus (JIRA)" <ji...@apache.org> on 2016/02/26 11:07:18 UTC

[jira] [Commented] (SOLR-8739) Query Norm not calculated when SchemaSimilarityFactory is used

    [ https://issues.apache.org/jira/browse/SOLR-8739?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15168758#comment-15168758 ] 

Sascha Markus commented on SOLR-8739:
-------------------------------------

Of couse the same applies to methods like public float coord(int overlap, int maxOverlap) 

> Query Norm not calculated when SchemaSimilarityFactory is used 
> ---------------------------------------------------------------
>
>                 Key: SOLR-8739
>                 URL: https://issues.apache.org/jira/browse/SOLR-8739
>             Project: Solr
>          Issue Type: Bug
>          Components: search
>    Affects Versions: 5.3.1, 5.4.1
>            Reporter: Sascha Markus
>
> If any kind of similarity is defined and therefore the SchemaSimilarityFactory is defined as global similarity the queryNorm is always 1.0
> The PerFieldSimilarityWrapper delegates some of the methods to the desired Similarity but misses to delegate public float queryNorm(float valueForNormalization)
> Instead the IndexReader calls this method on the base class Similarity.
> The result is that all scores are much higher.
> I created a custom similarity which extends ClassicSimilarity.
> To have the calculation fixed I did a local "hotfix"  which always uses the default similarity. Also wrong for some cases but fine in my scenario.
>   @Override
>   public float queryNorm(float valueForNormalization) {
>     return get("").queryNorm(valueForNormalization); // use default similarity to calculate
>   }



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

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