private static Document CreateDocument(System.String text, int ng1, int ng2) { Document doc = new Document(); doc.Add(new Field(F_WORD, text, Field.Store.YES, Field.Index.NOT_ANALYZED)); // orig term AddGram(text, doc, ng1, ng2); return doc; }