# Indexing PDF documents with ElasticSearch

**URL:** https://discuss.elastic.co/t/indexing-pdf-documents-with-elasticsearch/13909
**Category:** Elasticsearch
**Created:** [October 10, 2013, 3:53pm UTC](https://discuss.elastic.co/t/indexing-pdf-documents-with-elasticsearch/13909 "2013-10-10T15:53:22Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![cs\_irfan](https://avatars.discourse-cdn.com/v4/letter/c/e8c25b/32.png) [@cs\_irfan](https://discuss.elastic.co/u/cs_irfan)
#### Post date: [October 10, 2013, 3:53pm UTC](https://discuss.elastic.co/t/indexing-pdf-documents-with-elasticsearch/13909/1 "2013-10-10T15:53:22Z")

</div>

Hello Dear All,  
I am beginner to ElasticSearch and very much interested in ElasticSearch. I  
am using ElasticSearch 0.90.5 binary on Windows. I have copied Apache Tika  
1.4 jar file (tika-app-1.4.jar) and  
elasticsearch-mapper-attachments-1.9.0.jar into lib folder of  
elasticsearch. When I index pdf file, it gives me the following exception:

{  
"error": "ClassCastException[java.util.ArrayList cannot be cast to  
java.util.Map]",  
"status": 500  
}  
I am using Dell Core i3 with Windows 7 64-bit.

Kindly guide.....  
Regards

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<div class="post-metadata">

### Author: ![Lukas\_Vlcek1](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/lukas_vlcek1/32/819_2.png) [@Lukas\_Vlcek1](https://discuss.elastic.co/u/Lukas_Vlcek1)
#### Post date: [October 10, 2013, 4:02pm UTC](https://discuss.elastic.co/t/indexing-pdf-documents-with-elasticsearch/13909/2 "2013-10-10T16:02:28Z")

</div>

Hi,

If you plan to index a lot of documents then I would consider extracting  
text from PDF on the client side - i.e. before you send the data to  
Elasticsearch. PDF parsing can be quite expensive and the size of the data  
in index request will be probably much smaller if it contains pure plain  
text compared to Base64 encoded PDF file.

Just my 2 cents.

Regards,  
Lukas

On Thu, Oct 10, 2013 at 5:53 PM, [cs.irfan@upesh.edu.pk](mailto:cs.irfan@upesh.edu.pk) wrote:

> Hello Dear All,  
> I am beginner to Elasticsearch and very much interested in Elasticsearch.  
> I am using Elasticsearch 0.90.5 binary on Windows. I have copied Apache  
> Tika 1.4 jar file (tika-app-1.4.jar) and elasticsearch-mapper-\*\*attachments-1.9.0.jar  
> into lib folder of elasticsearch. When I index pdf file, it gives me the  
> following exception:
> 
> {  
> "error": "ClassCastException[java.util.\*\*ArrayList cannot be cast to  
> java.util.Map]",  
> "status": 500  
> }  
> I am using Dell Core i3 with Windows 7 64-bit.
> 
> Kindly guide.....  
> Regards
> 
> --  
> You received this message because you are subscribed to the Google Groups  
> "elasticsearch" group.  
> To unsubscribe from this group and stop receiving emails from it, send an  
> email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
> For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<div class="post-metadata">

### Author: ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)
#### Post date: [July 6, 2017, 2:13am UTC](https://discuss.elastic.co/t/indexing-pdf-documents-with-elasticsearch/13909/3 "2017-07-06T02:13:00Z")

</div>


