Exemplo n.º 1
0
 internal BaseTermsEnum(FSTTermsReader.TermsReader outerInstance)
 {
     this.outerInstance = outerInstance;
     this.state         = outerInstance.outerInstance.postingsReader.NewTermState();
     this.bytesReader   = new ByteArrayDataInput();
     this.term          = null;
     // NOTE: metadata will only be initialized in child class
 }
Exemplo n.º 2
0
 //JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in .NET:
 //ORIGINAL LINE: SegmentTermsEnum() throws java.io.IOException
 internal SegmentTermsEnum(FSTTermsReader.TermsReader outerInstance) : base(outerInstance)
 {
     this.outerInstance = outerInstance;
     this.fstEnum       = new BytesRefFSTEnum <FSTTermOutputs.TermData>(outerInstance.dict);
     this.decoded       = false;
     this.seekPending   = false;
     this.meta          = null;
 }
Exemplo n.º 3
0
                internal IntersectTermsEnum(FSTTermsReader.TermsReader outerInstance, CompiledAutomaton compiled, BytesRef startTerm) : base(outerInstance)
                {
                    this.outerInstance = outerInstance;
                    //if (TEST) System.out.println("Enum init, startTerm=" + startTerm);
                    this.fst        = outerInstance.dict;
                    this.fstReader  = fst.GetBytesReader();
                    this.fstOutputs = outerInstance.dict.Outputs;
                    this.fsa        = compiled.RunAutomaton;
                    this.level      = -1;
                    this.stack      = new Frame[16];
                    for (int i = 0; i < stack.Length; i++)
                    {
                        this.stack[i] = new Frame(this);
                    }

                    Frame frame;

                    frame = LoadVirtualFrame(NewFrame());
                    this.level++;
                    frame = LoadFirstFrame(NewFrame());
                    PushFrame(frame);

                    this.meta     = null;
                    this.metaUpto = 1;
                    this.decoded  = false;
                    this.pending  = false;

                    if (startTerm == null)
                    {
                        pending = IsAccept(TopFrame());
                    }
                    else
                    {
                        DoSeekCeil(startTerm);
                        pending = !startTerm.Equals(term) && IsValid(TopFrame()) && IsAccept(TopFrame());
                    }
                }