(String)attachment.get("_content_type") return null value

Hi all,

I looked through a document id, and I want to identify different document
information returned, such as content_type, but its value is equal to null,
I have the following code :

 GetResponse responseEs = 

esClient.prepareGet().setIndex(INDEX_NAME).setId(id).execute().actionGet();

 Map<String, Object> attachment = (Map<String, 

Object>)responseEs.getSource().get("file");

 String contentType = (String)attachment.get("_content_type");

different value of the map attchement are:
{content=dfgrr....,_name=test.pdf}

I have not written the total value of the field content, I have not found
the _content_type field ........and i don't know why this field does not
exist....

--
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.
For more options, visit https://groups.google.com/groups/opt_out.

I think you are hitting this issue: save all tika metadata · Issue #1 · elastic/elasticsearch-mapper-attachments · GitHub

--
David Pilato | Technical Advocate | Elasticsearch.com
@dadoonet | @elasticsearchfr | @scrutmydocs

Le 7 mars 2013 à 09:30, Ammar Yahia yahia.ammar.info@gmail.com a écrit :

Hi all,

I looked through a document id, and I want to identify different document information returned, such as content_type, but its value is equal to null, I have the following code :

 GetResponse responseEs = esClient.prepareGet().setIndex(INDEX_NAME).setId(id).execute().actionGet();

 Map<String, Object> attachment = (Map<String, Object>)responseEs.getSource().get("file");

 String contentType = (String)attachment.get("_content_type");

different value of the map attchement are:
{content=dfgrr....,_name=test.pdf}

I have not written the total value of the field content, I have not found the _content_type field ........and i don't know why this field does not exist....

--
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.
For more options, visit 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.
For more options, visit https://groups.google.com/groups/opt_out.

So this issue is not fixed yet ?

--
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.
For more options, visit https://groups.google.com/groups/opt_out.