protected String concatFields(SolrInputDocument doc){
  StringBuilder sb=new StringBuilder(getExpectedSize(doc,inputFields));
  for (  String fieldName : inputFields) {
    log.debug("Appending field " + fieldName);
    if (doc.containsKey(fieldName)) {
      Collection<Object> fieldValues=doc.getFieldValues(fieldName);
      if (fieldValues != null) {
        for (        Object content : fieldValues) {
          if (content instanceof String) {
            String stringContent=(String)content;
            if (stringContent.length() > maxFieldValueChars) {
              sb.append(stringContent.substring(0,maxFieldValueChars));
            }
 else {
              sb.append(stringContent);
            }
            sb.append(" ");
            if (sb.length() > maxTotalChars) {
              sb.setLength(maxTotalChars);
              break;
            }
          }
 else {
            log.warn("Field " + fieldName + " not a String value, not including in detection");
          }
        }
      }
    }
  }
  return sb.toString();
}

protected String concatFields ( SolrInputDocument doc ) { StringBuilder sb = new StringBuilder ( getExpectedSize ( doc , inputFields ) ) ; for ( String fieldName : inputFields ) { log . debug ( "Appending field " + fieldName ) ; if ( doc . containsKey ( fieldName ) ) { Collection < Object > fieldValues = doc . getFieldValues ( fieldName ) ; if ( fieldValues != null ) { for ( Object content : fieldValues ) { if ( content instanceof String ) { String stringContent = ( String ) content ; if ( stringContent . length ( ) > maxFieldValueChars ) { sb . append ( stringContent . substring ( 0 , maxFieldValueChars ) ) ; } else { sb . append ( stringContent ) ; } sb . append ( " " ) ; if ( sb . length ( ) > maxTotalChars ) { sb . setLength ( maxTotalChars ) ; break ; } } else { log . warn ( "Field " + fieldName + " not a String value, not including in detection" ) ; } } } } } return sb . toString ( ) ; }
concatenates content from multiple fields
