@Override public String toString(){
  StringBuilder result=new StringBuilder();
  if (stored()) {
    result.append("stored");
  }
  if (indexOptions != IndexOptions.NONE) {
    if (result.length() > 0)     result.append(",");
    result.append("indexed");
    if (tokenized()) {
      result.append(",tokenized");
    }
    if (storeTermVectors()) {
      result.append(",termVector");
    }
    if (storeTermVectorOffsets()) {
      result.append(",termVectorOffsets");
    }
    if (storeTermVectorPositions()) {
      result.append(",termVectorPosition");
    }
    if (storeTermVectorPayloads()) {
      result.append(",termVectorPayloads");
    }
    if (omitNorms()) {
      result.append(",omitNorms");
    }
    if (indexOptions != IndexOptions.DOCS_AND_FREQS_AND_POSITIONS) {
      result.append(",indexOptions=");
      result.append(indexOptions);
    }
  }
  if (dimensionCount != 0) {
    if (result.length() > 0) {
      result.append(",");
    }
    result.append("pointDimensionCount=");
    result.append(dimensionCount);
    result.append(",pointNumBytes=");
    result.append(dimensionNumBytes);
  }
  if (docValuesType != DocValuesType.NONE) {
    if (result.length() > 0) {
      result.append(",");
    }
    result.append("docValuesType=");
    result.append(docValuesType);
  }
  return result.toString();
}

@ Override public String toString ( ) { StringBuilder result = new StringBuilder ( ) ; if ( stored ( ) ) { result . append ( "stored" ) ; } if ( indexOptions != IndexOptions . NONE ) { if ( result . length ( ) > 0 ) result . append ( "," ) ; result . append ( "indexed" ) ; if ( tokenized ( ) ) { result . append ( ",tokenized" ) ; } if ( storeTermVectors ( ) ) { result . append ( ",termVector" ) ; } if ( storeTermVectorOffsets ( ) ) { result . append ( ",termVectorOffsets" ) ; } if ( storeTermVectorPositions ( ) ) { result . append ( ",termVectorPosition" ) ; } if ( storeTermVectorPayloads ( ) ) { result . append ( ",termVectorPayloads" ) ; } if ( omitNorms ( ) ) { result . append ( ",omitNorms" ) ; } if ( indexOptions != IndexOptions . DOCS_AND_FREQS_AND_POSITIONS ) { result . append ( ",indexOptions=" ) ; result . append ( indexOptions ) ; } } if ( dimensionCount != 0 ) { if ( result . length ( ) > 0 ) { result . append ( "," ) ; } result . append ( "pointDimensionCount=" ) ; result . append ( dimensionCount ) ; result . append ( ",pointNumBytes=" ) ; result . append ( dimensionNumBytes ) ; } if ( docValuesType != DocValuesType . NONE ) { if ( result . length ( ) > 0 ) { result . append ( "," ) ; } result . append ( "docValuesType=" ) ; result . append ( docValuesType ) ; } return result . toString ( ) ; }
prints a field for human consumption .
