public override int Compare(ScoreDoc doc1, ScoreDoc doc2)
 {
     // cannot return v1-v2 because it could overflow
     if (m_values.Get(doc1.Doc) < m_values.Get(doc2.Doc))
     {
         return(-1);
     }
     else if (m_values.Get(doc1.Doc) > m_values.Get(doc2.Doc))
     {
         return(1);
     }
     else
     {
         return(0);
     }
 }
示例#2
0
 /// <summary>
 /// NOTE: This was floatVal() in Lucene
 /// </summary>
 public override float SingleVal(int doc)
 {
     return(arr.Get(doc));
 }