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

Mark Miller edited comment on LUCENE-1837 at 8/23/09 9:29 AM:
--------------------------------------------------------------

Right - I was just writing to that affect. If we can get that info back too, I 
think we are golden. What I was writting:

It looks like we have to calc twice (not sure about phrasequery - with that it 
looks like we would have to calc a bunch of info the scorer doesn't even use?) 
with termweight.

  We want to grab the info on the TermWeight constructor and store it. That 
info is already calced, but we don't have access to it:
{code}

    public PhraseWeight(Searcher searcher)
      throws IOException {
      this.similarity = getSimilarity(searcher);

      idf = similarity.idf(terms, searcher);
      // Similiarity#idf
      // public float idf(Term term, Searcher searcher) throws IOException {
      //   return idf(searcher.docFreq(term), searcher.maxDoc());
      // }
    }

 
{code}

  *edit*

bq. not sure about phrasequery - with that it looks like we would have to calc 
a bunch of info the scorer doesn't even use?

Okay, we do use all of that - again the info is just all hidden behind the 
Similarity. 

So we would also want all the  docFreq info from every term in:

public float idf(Collection terms, Searcher searcher) throws IOException {

      was (Author: markrmil...@gmail.com):
    Right - I was just writing to that affect. If we can get that info back 
too, I think we are golden. What I was writting:

It looks like we have to calc twice (not sure about phrasequery - with that it 
looks like we would have to calc a bunch of info the scorer doesn't even use?) 
with termweight.

  We want to grab the info on the TermWeight constructor and store it. That 
info is already calced, but we don't have access to it:
{code}

    public PhraseWeight(Searcher searcher)
      throws IOException {
      this.similarity = getSimilarity(searcher);

      idf = similarity.idf(terms, searcher);
      // Similiarity#idf
      // public float idf(Term term, Searcher searcher) throws IOException {
      //   return idf(searcher.docFreq(term), searcher.maxDoc());
      // }
    }

 
{code}

  
  
> Remove Searcher from explain and idf/maxDoc info from explain
> -------------------------------------------------------------
>
>                 Key: LUCENE-1837
>                 URL: https://issues.apache.org/jira/browse/LUCENE-1837
>             Project: Lucene - Java
>          Issue Type: Bug
>            Reporter: Mark Miller
>            Assignee: Mark Miller
>             Fix For: 2.9
>
>
> these changes (starting with the TermWeight idf/maxDoc info) were illegal IMO 
> - I think they need to be rolled back/out.

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