public void addField(String fieldName, String text, Analyzer analyzer) {if (fieldName == null)throw new IllegalArgumentException("fieldName must not be null");if (text == null)throw new IllegalArgumentException("text must not be null");if (analyzer == null)throw new IllegalArgumentException("analyzer must not be null");TokenStream stream = analyzer.tokenStream(fieldName, text);storeTerms(getInfo(fieldName, defaultFieldType), stream,analyzer.getPositionIncrementGap(fieldName), analyzer.getOffsetGap(fieldName));}

public virtual void AddField(string fieldName, string text, Analyzer analyzer){if (fieldName == null){throw new System.ArgumentException("fieldName must not be null");}if (text == null){throw new System.ArgumentException("text must not be null");}if (analyzer == null){throw new System.ArgumentException("analyzer must not be null");}TokenStream stream;try{stream = analyzer.GetTokenStream(fieldName, text);}catch (IOException ex){throw new Exception(ex.ToString(), ex);}AddField(fieldName, stream, 1.0f, analyzer.GetPositionIncrementGap(fieldName), analyzer.GetOffsetGap(fieldName));}
