I have done basic indexing in Elastic search using the JAVA api. I am using Elastic Search 5.1.1. I am really new to this so sorry if this is a basic question but this is what i am trying to do
I installed the ingest-attachment plugin using the command tool
We have an attachment storage for now lets assume i can read document in bytes or have access to the location where tthe document is stored like c:\temp\transactionid.pdf
The question is now how do i tie all of this together? How do i use the Java transport client and Index API (PUT) to submit this attachment to an index named attachment_index so it becomes searchable?
You need to first create a pipeline which uses ingest-attachment processor.
Then simply index a document as usual but with a pipeline. In this document, encode the binary content into BASE64 and add this to a field of your doc.
FYI you can also look at FSCrawler project in case it can help.
Now i want to use this pipeline in my Java client during my client.prepareIndex call. Is there a way to specify which pipeline to use as well when sending the data? I will be using Apache commons BASE64 encoder to encode the file.
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.