src/main/java/org/novus/controller/IngestorController.java
/**
   * controller to upload csv file and ingest data into es
   * 
   * @param uploadingFiles
   * @param esUrl
   * @param clusterName
   * @param index
   * @param type
   * @param mapping
   * @return
   * @throws IOException
   */
controller to upload csv file and ingest data into es


controller to upload csv file and ingest data into es
@RequestMapping(value = "/csv", method = RequestMethod.POST)
  public String uploadingCsvPost(@RequestParam("uploadingFiles") MultipartFile[] uploadingFiles,
      @RequestParam("esUrl") String esUrl, @RequestParam(value = "clusterName") String clusterName,
      @RequestParam(value = "index") String index, @RequestParam(value = "type") String type,
      @RequestParam(value = "mapping") String mapping) throws IOException {
    TransportClient client = ESClient.createEsClient(clusterName, esUrl, index, mapping, restTemplate);
    ingestorService.csvLoader(index, type, client, uploadingFiles);
    return "redirect:/";
  }
@ RequestMapping ( value = "/csv" , method = RequestMethod . POST ) public String uploadingCsvPost ( @ RequestParam ( "uploadingFiles" ) MultipartFile [ ] uploadingFiles , @ RequestParam ( "esUrl" ) String esUrl , @ RequestParam ( value = "clusterName" ) String clusterName , @ RequestParam ( value = "index" ) String index , @ RequestParam ( value = "type" ) String type , @ RequestParam ( value = "mapping" ) String mapping ) throws IOException { TransportClient client = ESClient . createEsClient ( clusterName , esUrl , index , mapping , restTemplate ) ; ingestorService . csvLoader ( index , type , client , uploadingFiles ) ; return "redirect:/" ; }
controller to upload csv file and ingest data into es
controller to upload csv file and ingest data into es