Esempio n. 1
0
 //
 protected internal override bool SetFreqCurrentDoc()
 {
     if (!More)
     {
         return(false);
     }
     Doc          = Spans.Doc();
     Freq_Renamed = 0.0f;
     PayloadScore = 0;
     PayloadsSeen = 0;
     do
     {
         int matchLength = Spans.End() - Spans.Start();
         Freq_Renamed += DocScorer.ComputeSlopFactor(matchLength);
         Spans[] spansArr = new Spans[1];
         spansArr[0] = Spans;
         GetPayloads(spansArr);
         More = Spans.Next();
     } while (More && (Doc == Spans.Doc()));
     return(true);
 }
Esempio n. 2
0
                protected internal override bool SetFreqCurrentDoc()
                {
                    if (!More)
                    {
                        return(false);
                    }
                    Doc                  = Spans.Doc();
                    Freq_Renamed         = 0.0f;
                    NumMatches           = 0;
                    PayloadScore_Renamed = 0;
                    PayloadsSeen         = 0;
                    while (More && Doc == Spans.Doc())
                    {
                        int matchLength = Spans.End() - Spans.Start();

                        Freq_Renamed += DocScorer.ComputeSlopFactor(matchLength);
                        NumMatches++;
                        ProcessPayload(OuterInstance.Similarity);

                        More = Spans.Next(); // this moves positions to the next match in this
                        // document
                    }
                    return(More || (Freq_Renamed != 0));
                }