I tried to use elasticsearch-mapper-attachments plugin to parse and index DOCs.
I have a problem after using the steps from Github(https://github.com/elastic/elasticsearch-mapper-attachments), and installed the plugin by command "sudo bin/plugin install mapper-attachments".
When I search the word which is contained in the file, it just returns:
curl -XGET 'http://localhost:9200/docindex/attachment/_search?q=queen'
{"took":1,"timed_out":false,"_shards":{"total":1,"successful":1,"failed":0},"hits":{"total":1,"max_score":0.17807949,"hits":[{"_index":"docindex","_type":"attachment","_id":"AVUEr3a0yjwKXQqIwoDd","_score":0.17807949,"_source":
{
"file": "IkdvZCBTYXZlIHRoZSBRdWVlbiIgKGFsdGVybmF0aXZlbHkgIkdvZCBTYXZlIHRoZSBLaW5nIg=="
}}
It does not return the real content, just a base64 encoded string. And I can not find anything when using Kibana.
Its mapping looks like correct:
curl "http://localhost:9200/docindex/_mapping"
{"docindex":{"mappings":{"attachment":{"properties":{"_indexed_chars":{"type":"long"},"file":{"type":"attachment","fields":{"content":{"type":"string"},"author":{"type":"string"},"title":{"type":"string"},"name":{"type":"string"},"date":{"type":"date","format":"strict_date_optional_time||epoch_millis"},"keywords":{"type":"string"},"content_type":{"type":"string"},"content_length":{"type":"integer"},"language":{"type":"string"}}}}}}}}
How can I fix it?
My softwares are:
jdk: 1.7.0_76
elasticsearch: 2.2.0