lib/Models/GnafApi.js
function buildRequestData(searchTerm, maxResults) {
  var requestData = {
    numHits: maxResults,
    fuzzy: {
      maxEdits: 2,
      minLength: 5,
      prefixLength: 2
    }
  };

  if (searchTerm instanceof Array) {
    requestData["addresses"] = searchTerm.map(processAddress);
  } else {
    requestData["addr"] = processAddress(searchTerm);
  }
  return requestData;
}
function buildRequestData(searchTerm, maxResults) {
  var requestData = {
    numHits: maxResults,
    fuzzy: {
      maxEdits: 2,
      minLength: 5,
      prefixLength: 2
    }
  };

  if (searchTerm instanceof Array) {
    requestData["addresses"] = searchTerm.map(processAddress);
  } else {
    requestData["addr"] = processAddress(searchTerm);
  }
  return requestData;
}
function buildRequestData ( searchTerm , maxResults ) { var requestData = { numHits : maxResults , fuzzy : { maxEdits : 2 , minLength : 5 , prefixLength : 2 } } ; if ( searchTerm instanceof Array ) { requestData [ "addresses" ] = searchTerm . map ( processAddress ) ; } else { requestData [ "addr" ] = processAddress ( searchTerm ) ; } return requestData ; }
Builds the data to be POSTed to elastic search.

@param {string} searchTerm The plain-text query to search for.
@param {number} maxResults The max number of results to search for.
Builds the data to be POSTed to elastic search .