dqj5046 2016-05-10 17:34
浏览 56
已采纳

从查询结果中呈现PDF或其他其他文档由elasticsearch返回

I am working on a project to index PDF documents (mainly PDF for now). i found out elastic search could index attached document using Apache Tika.

I have implemented elastic search, indexed few PDF documents and also using PHP as the client to render the query result return by elastic search.

Would appreciate if i could get a link to some tutorial on how to locate the PDF attached to elastic search from the query result returned by elastic search.

Have searched online couldn't find any tutorial relating to what i want to achieve

  • 写回答

1条回答 默认 最新

  • doutuobao9736 2016-05-10 18:30
    关注

    In documentation it says Elasticseacrh store content of the attachement as base64 encoded. So after you search, you can get document content as base64 encoded again. Then you can decode that content as pdf. For example check that thread to see how it can be done: PHP get pdf file from base64 encoded data string

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?