[jira] Created: (LUCENE-2040) PhraseQuery weight uses IDFExplanation.getIdf() method instead of Similarity.idf() directly

View: New views
4 Messages — Rating Filter:   Alert me  

[jira] Created: (LUCENE-2040) PhraseQuery weight uses IDFExplanation.getIdf() method instead of Similarity.idf() directly

by JIRA jira@apache.org :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

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@...
For additional commands, e-mail: java-dev-help@...


[jira] Resolved: (LUCENE-2040) PhraseQuery weight uses IDFExplanation.getIdf() method instead of Similarity.idf() directly

by JIRA jira@apache.org :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


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

Uwe Schindler resolved LUCENE-2040.
-----------------------------------

    Resolution: Won't Fix

I looked into this: In 2.9.0 it was using the idf(Collection<Term>, Searcher) method, but this was deprecated (don't know why!). The correct way is now to override idfExplain to change scoring for phrase queries (even it does some unneeded work like filling a StringBuilder with explanations).

> 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@...
For additional commands, e-mail: java-dev-help@...


[jira] Commented: (LUCENE-2040) PhraseQuery weight uses IDFExplanation.getIdf() method instead of Similarity.idf() directly

by JIRA jira@apache.org :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


    [ 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@...
For additional commands, e-mail: java-dev-help@...


[jira] Commented: (LUCENE-2040) PhraseQuery weight uses IDFExplanation.getIdf() method instead of Similarity.idf() directly

by JIRA jira@apache.org :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


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

Uwe Schindler commented on LUCENE-2040:
---------------------------------------

See for reference:

- LUCENE-1837
- LUCENE-1847

> 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@...
For additional commands, e-mail: java-dev-help@...