Exemplo n.º 1
0
            public override SeekStatus SeekCeil(BytesRef text)
            {
                BytesRefFSTEnum.InputOutput <PairOutputs.Pair <long?, PairOutputs.Pair <long?, long?> > > result =
                    fstEnum.SeekCeil(text);
                if (result == null)
                {
                    //System.out.println("  end");
                    return(SeekStatus.END);
                }
                else
                {
                    //System.out.println("  got text=" + term.utf8ToString());
                    PairOutputs.Pair <long?, PairOutputs.Pair <long?, long?> > pair1 = result.output;
                    PairOutputs.Pair <long?, long?> pair2 = pair1.output2;
                    docsStart             = pair1.output1;
                    docFreq_Renamed       = (int)pair2.output1;
                    totalTermFreq_Renamed = pair2.output2;

                    if (result.input.Equals(text))
                    {
                        //System.out.println("  match docsStart=" + docsStart);
                        return(SeekStatus.FOUND);
                    }
                    else
                    {
                        //System.out.println("  not match docsStart=" + docsStart);
                        return(SeekStatus.NOT_FOUND);
                    }
                }
            }
Exemplo n.º 2
0
 public override bool SeekExact(BytesRef text)
 {
     BytesRefFSTEnum.InputOutput <PairOutputs.Pair <long?, PairOutputs.Pair <long?, long?> > > result =
         fstEnum.SeekExact(text);
     if (result != null)
     {
         PairOutputs.Pair <long?, PairOutputs.Pair <long?, long?> > pair1 = result.output;
         PairOutputs.Pair <long?, long?> pair2 = pair1.output2;
         docsStart             = pair1.Output1;
         docFreq_Renamed       = (int)pair2.Output1;
         totalTermFreq_Renamed = pair2.Output2;
         return(true);
     }
     else
     {
         return(false);
     }
 }
Exemplo n.º 3
0
 public override BytesRef Next()
 {
     Debug.Assert(!ended);
     BytesRefFSTEnum.InputOutput <PairOutputs.Pair <long?, PairOutputs.Pair <long?, long?> > > result =
         fstEnum.Next();
     if (result != null)
     {
         PairOutputs.Pair <long?, PairOutputs.Pair <long?, long?> > pair1 = result.output;
         PairOutputs.Pair <long?, long?> pair2 = pair1.output2;
         docsStart             = pair1.output1;
         docFreq_Renamed       = (int)pair2.output1;
         totalTermFreq_Renamed = pair2.output2;
         return(result.input);
     }
     else
     {
         return(null);
     }
 }