public NotTerm(IParseTerm NotTerm, int maxDoc) { Ch = NotTerm; now = 0; LastCh = NotTerm.NextPage(now); MaxDoc = maxDoc; }
public AndTerm(IParseTerm first, IParseTerm second) { Ch = new List <IParseTerm> { first, second }; chLast = new List <int> { first.NextPage(0), second.NextPage(0) }; }
public int NextPage(int min) { now++; for (; now == LastCh;) { now++; LastCh = Ch.NextPage(now); } if (LastCh == -1 && now >= MaxDoc) { return(-1); } return(now); }
public List <int> Search(string Zapros, out List <List <Tuple <int, int> > > ToCreateSniped) { IParseTerm Term = Parser.parse(Zapros);//Parser.InitQuote(Zapros.Split(), 10);// ToCreateSniped = new List <List <Tuple <int, int> > >(); List <int> SearchList = new List <int>(); int n = 0; if (Term != null) { for (;;) { n = Term.NextPage(n); if (n == -1) { break; } SearchList.Add(n); ToCreateSniped.Add(Term.GetInfo()); } } return(SearchList); }