// LUCENENET specific - method added for better .NET compatibility public virtual string ToString(string format, IFormatProvider provider) { IIndexableField realValue = GetRealValue(); if (realValue is IFormattable formattable) { return(formattable.ToString(format, provider)); } else { return(realValue.ToString()); } }