title: ElasticSearch - Index a large file using Java API
body: <p>We have a requirement wherein we have to use ElasticSearch for performing full text search. We have a Spring based application and for integration with ES we can use either Java API of Elastic Search or Spring Data for ElasticSearch. </p>
  
  <p>The input will be of a file type having size around 5MB.</p>
  
  <p>I went through examples for both ES Java API and SpringData, they do have
  tutorials available for inserting a JSON document. </p>
  
  <p>But any help with regards to using File as an input to create documents/index is not available.</p>
  
  <p>I am newbie with Elastic Search, any guidance/help on this will be much appreciated.</p>
  
  <p>EDIT: </p>
  
  <p>I could see that there is a Ingest Attachment Processor plugin available in ES (<a href="https://www.elastic.co/guide/en/elasticsearch/plugins/master/ingest-attachment.html" rel="nofollow">https://www.elastic.co/guide/en/elasticsearch/plugins/master/ingest-attachment.html</a>). </p>
  
  <p>Can anybody point me to a sample CURL request to use this plugin or any Java code to use this plugin</p>