Esempio n. 1
0
 public virtual float Coord(int overlap, int maxOverlap)
 {
     // LUCENE-4300: in most cases of maxOverlap=1, BQ rewrites itself away,
     // so coord() is not applied. But when BQ cannot optimize itself away
     // for a single clause (minNrShouldMatch, prohibited clauses, etc), its
     // important not to apply coord(1,1) for consistency, it might not be 1.0F
     return(maxOverlap == 1 ? 1F : m_similarity.Coord(overlap, maxOverlap));
 }
Esempio n. 2
0
            internal int nrMatchers;             // to be increased by score() of match counting scorers.

            internal virtual void  Init()
            {
                // use after all scorers have been added.
                coordFactors = new float[maxCoord + 1];
                Similarity sim = Enclosing_Instance.Similarity;

                for (int i = 0; i <= maxCoord; i++)
                {
                    coordFactors[i] = sim.Coord(i, maxCoord);
                }
            }
Esempio n. 3
0
 public override float Coord(int overlap, int maxOverlap)
 {
     return(@delegate.Coord(overlap, maxOverlap));
 }