lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Andi Vajda (JIRA)" <j...@apache.org>
Subject [jira] Commented: (LUCENE-2040) PhraseQuery weight uses IDFExplanation.getIdf() method instead of Similarity.idf() directly
Date Fri, 06 Nov 2009 22:26:32 GMT

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

Andi Vajda commented on LUCENE-2040:
------------------------------------

The reason for filing the bug was two-fold:
  1. Uwe asked me to
  2. I found it strange that a query would leverage the Explanation stuff to
     derive scoring
In PyLucene, I undeprecated the idf(Collection terms, Searcher searcher) and 
implemented it via the IDFExplanation.idfExplain() hack so that extenders of 
Similarity don't have to see this:

     public IDFExplanation idfExplain(final Collection<Term> terms,
                                      final Searcher searcher)
     {
         return new IDFExplanation() {
             public float getIdf()
             {
                 return idfTerms(terms, searcher);
             }

             public String explain()
             {
                 return null;
             }
         };
     }

I guess, I'm wondering why this method was deprecated since it's come back 
through an IDFExplanation backdoor ?


> PhraseQuery weight uses IDFExplanation.getIdf() method instead of Similarity.idf() directly
> -------------------------------------------------------------------------------------------
>
>                 Key: LUCENE-2040
>                 URL: https://issues.apache.org/jira/browse/LUCENE-2040
>             Project: Lucene - Java
>          Issue Type: Improvement
>          Components: Examples
>            Reporter: Andi Vajda
>            Assignee: Uwe Schindler
>            Priority: Minor
>
> It should use Similarity's idf() method instead.

-- 
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