public Integer extractNumFound(String jsonString, String recordId) {
    int numFound = 1;
    if (StringUtils.isBlank(jsonString)) {
      return numFound;
    }

    Object document = JSON_PROVIDER.parse(jsonString);
    if (document instanceof LinkedHashMap) {
      Map documentMap = (LinkedHashMap) document;
      if (documentMap.containsKey("response")) {
        Map response = (LinkedHashMap) documentMap.get("response");
        numFound = (int) response.get("numFound");
      } else {
        LOGGER.severe("No 'response' part in Solr response: " + jsonString);
      }
    } else {
      LOGGER.severe("Problem with parsing Solr response: >>" + document
          + "<< class:" + document.getClass());
    }

    return numFound;
  }
public Integer extractNumFound ( String jsonString , String recordId ) { int numFound = 1 ; if ( StringUtils . isBlank ( jsonString ) ) { return numFound ; } Object document = JSON_PROVIDER . parse ( jsonString ) ; if ( document instanceof LinkedHashMap ) { Map documentMap = ( LinkedHashMap ) document ; if ( documentMap . containsKey ( "response" ) ) { Map response = ( LinkedHashMap ) documentMap . get ( "response" ) ; numFound = ( int ) response . get ( "numFound" ) ; } else { LOGGER . severe ( "No 'response' part in Solr response: " + jsonString ) ; } } else { LOGGER . severe ( "Problem with parsing Solr response: >>" + document + "<< class:" + document . getClass ( ) ) ; } return numFound ; }
Extracts sums and average of TF-IDF value for the schema's Solr field array.

@param jsonString
The JSON string
@param recordId
The record identifier
@return
Sums and average of TF-IDF value