# Elasticsearch is not able to search for NonEnglish text present in PDF type of attachmentE

**URL:** https://discuss.elastic.co/t/elasticsearch-is-not-able-to-search-for-nonenglish-text-present-in-pdf-type-of-attachmente/23612
**Category:** Elasticsearch
**Created:** [May 12, 2015, 9:17am UTC](https://discuss.elastic.co/t/elasticsearch-is-not-able-to-search-for-nonenglish-text-present-in-pdf-type-of-attachmente/23612 "2015-05-12T09:17:21Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![Prashant\_Pal](https://avatars.discourse-cdn.com/v4/letter/p/b77776/32.png) [@Prashant\_Pal](https://discuss.elastic.co/u/Prashant_Pal)
#### Post date: [May 12, 2015, 9:17am UTC](https://discuss.elastic.co/t/elasticsearch-is-not-able-to-search-for-nonenglish-text-present-in-pdf-type-of-attachmente/23612/1 "2015-05-12T09:17:21Z")

</div>

Hi Team,

We are facing an issue while searching the Non English text indexed as PDF type of document. Below are the complete details.

1. I am having a pdf document as New\_Pdf\_issue.pdf which is attached in this mail.
2. Created an indexing request alongwith mapping as well which is attached as pdf\_index\_issue.sh
3. Now if you will look onto pdf attachment you will find keywords such as "अधिकार", so if i am searching as "अधिकार" I am not able to get any matching documents for the same.

Note : What we observed is like when we perform search query as  
{  
"fields": [  
"SessionAtt.content\_type",  
"SessionAtt"  
],  
"query": {  
"bool": {  
"must": [  
{  
"query\_string": {  
"fields": [  
"Content",  
"SessionAtt"  
],  
"query": "\*"  
}  
}  
]  
}  
}  
}

We are observing as "अधिकार" words has been indexed as "अधधकार".

So can anyone let me know what could be the issue for the same.

~Prashant

\<nabble\_a href="pdf\_index\_issue.sh"\>pdf\_index\_issue.sh\</nabble\_a\>  
\<nabble\_a href="New\_Pdf\_issue.pdf"\>New\_Pdf\_issue.pdf\</nabble\_a\>

---

<div class="post-metadata">

### Author: ![Robert\_Muir\_3](https://avatars.discourse-cdn.com/v4/letter/r/5fc32e/32.png) [@Robert\_Muir\_3](https://discuss.elastic.co/u/Robert_Muir_3)
#### Post date: [May 12, 2015, 11:06am UTC](https://discuss.elastic.co/t/elasticsearch-is-not-able-to-search-for-nonenglish-text-present-in-pdf-type-of-attachmente/23612/2 "2015-05-12T11:06:23Z")

</div>

Its your PDF (and the font being used plays a role in this case).

PDFs encode glyphs (display order), not characters (logical order).  
Usually the distinction is not important, but for complex writing systems  
it matters.

Open your PDF in acrobat and highlight the word in question, and do  
"copy/paste" and you will see it pastes the same way.  
You can also see this bogus mapping clearly if you extract the font data  
with fontforge (attached).

On Tue, May 12, 2015 at 5:17 AM, Prashant Agrawal \<  
[prashant.agrawal@paladion.net](mailto:prashant.agrawal@paladion.net)\> wrote:

> Hi Team,
> 
> We are facing an issue while searching the Non English text indexed as PDF  
> type of document. Below are the complete details.
> 
> 1. I am having a pdf document as New\_Pdf\_issue.pdf which is attached in  
> this  
> mail.
> 2. Created an indexing request alongwith mapping as well which is attached  
> as pdf\_index\_issue.sh
> 3. Now if you will look onto pdf attachment you will find keywords such as  
> "अधिकार", so if i am searching as "अधिकार" I am not able to get any  
> matching  
> documents for the same.
> 
> Note : What we observed is like when we perform search query as  
> {  
> "fields": [  
> "SessionAtt.content\_type",  
> "SessionAtt"  
> ],  
> "query": {  
> "bool": {  
> "must": [  
> {  
> "query\_string": {  
> "fields": [  
> "Content",  
> "SessionAtt"  
> ],  
> "query": "\*"  
> }  
> }  
> ]  
> }  
> }  
> }
> 
> We are observing as "अधिकार" words has been indexed as "अधधकार".
> 
> So can anyone let me know what could be the issue for the same.
> 
> ~Prashant
> 
> pdf\_index\_issue.sh  
> \<  
> [http://elasticsearch-users.115913.n3.nabble.com/file/n4074717/pdf\_index\_issue.sh](http://elasticsearch-users.115913.n3.nabble.com/file/n4074717/pdf_index_issue.sh)
> 
> > 
> 
> New\_Pdf\_issue.pdf  
> \<  
> [http://elasticsearch-users.115913.n3.nabble.com/file/n4074717/New\_Pdf\_issue.pdf](http://elasticsearch-users.115913.n3.nabble.com/file/n4074717/New_Pdf_issue.pdf)
> 
> > 
> 
> --  
> View this message in context:  
> [http://elasticsearch-users.115913.n3.nabble.com/Elasticsearch-is-not-able-to-search-for-Nonnglish-text-present-in-PDF-type-of-attachment-tp4074717.html](http://elasticsearch-users.115913.n3.nabble.com/Elasticsearch-is-not-able-to-search-for-Nonnglish-text-present-in-PDF-type-of-attachment-tp4074717.html)  
> Sent from the Elasticsearch Users mailing list archive at [Nabble.com](http://Nabble.com).
> 
> ## -- Please update your bookmarks! We have moved to [https://discuss.elastic.co/](https://discuss.elastic.co/)
> 
> 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).  
> To view this discussion on the web visit  
> [https://groups.google.com/d/msgid/elasticsearch/1431422241775-4074717.post%40n3.nabble.com](https://groups.google.com/d/msgid/elasticsearch/1431422241775-4074717.post%40n3.nabble.com)  
> .  
> For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

## -- Please update your bookmarks! We have moved to [https://discuss.elastic.co/](https://discuss.elastic.co/)

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).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/CAD06sYQRvGGvtROhGFKY%3DUkfgdvbM%3DAHiEftk8it4wWpgpK5hg%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CAD06sYQRvGGvtROhGFKY%3DUkfgdvbM%3DAHiEftk8it4wWpgpK5hg%40mail.gmail.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

### Author: ![Prashant\_Pal](https://avatars.discourse-cdn.com/v4/letter/p/b77776/32.png) [@Prashant\_Pal](https://discuss.elastic.co/u/Prashant_Pal)
#### Post date: [May 13, 2015, 5:12am UTC](https://discuss.elastic.co/t/elasticsearch-is-not-able-to-search-for-nonenglish-text-present-in-pdf-type-of-attachmente/23612/3 "2015-05-13T05:12:16Z")

</div>

Hi Robert,

I didn't get the complete understanding from the same. Can you just elaborate like if anything can be done for the same wrt Elasticsearch or plugin perspective or this is the inconsistent in terms of PDF type of attachment and nothing can be done for the same.

Its all depends upon the PDF content where some can be indexed properly and some not.

~Prashant

---

<div class="post-metadata">

### Author: ![Prashant\_Pal](https://avatars.discourse-cdn.com/v4/letter/p/b77776/32.png) [@Prashant\_Pal](https://discuss.elastic.co/u/Prashant_Pal)
#### Post date: [May 27, 2015, 9:12am UTC](https://discuss.elastic.co/t/elasticsearch-is-not-able-to-search-for-nonenglish-text-present-in-pdf-type-of-attachmente/23612/4 "2015-05-27T09:12:56Z")

</div>

Hi All,

Is there any solution for the above mentioned query.

~Prashant

---

<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, 12:11am UTC](https://discuss.elastic.co/t/elasticsearch-is-not-able-to-search-for-nonenglish-text-present-in-pdf-type-of-attachmente/23612/5 "2017-07-06T00:11:42Z")

</div>


