2

我正在尝试对 microsoft office 的所有产品进行索引和搜索。我发现它不适用于 excel 二进制书(.xlsb)。

我已成功执行索引,但无法从中找到单词。

我试过以下步骤:

         curl -X PUT "localhost:9200/test/attachment/_mapping" -d '{
           "attachment" : {
             "properties" : {
               "file" : {
                 "type" : "attachment",
                 "fields" : {
                   "title" : { "store" : "yes" },
                   "file" : { "term_vector":"with_positions_offsets", "store":"yes" }
                 }
               }
             }
           }
         }'

         coded=`cat test.xlsb | perl -MMIME::Base64 -ne 'print encode_base64($_)'`
         json="{\"file\":\"${coded}\"}"
         echo "$json" > json.file
         curl -X POST "localhost:9200/test/attachment/" -d @json.file

         curl "localhost:9200/_search?pretty=true" -d '{
           "fields" : ["title"],
           "query" : {
             "query_string" : {
               "query" : "sheet"
             }
           },
           "highlight" : {
             "fields" : {
               "file" : {}
             }
           }
          }'
4

1 回答 1

1

我们刚刚在 POI 中添加了流式传输/只读 xlsb 支持(在 3.15-beta3 中提供)。一旦发布,我们将升级 Apache Tika(1.15?),然后一旦 Elastic 升级,你应该很高兴。

仅仅4年后!

于 2017-03-16T18:50:40.187 回答