Mapper-attachments don't work well with es 2.2.0


(Haogle Haogle) #1

Env:
java version "1.8.0_20",
es: 2.2.0
mapper-attchments version:2.2.0

ES and mapper-attchments run well from /_plugin/head information.
follow these steps of https://github.com/elastic/elasticsearch-mapper-attachments#querying-or-accessing-metadata,

The below is mapping information:
{
"test" : {
"mappings" : {
"person" : {
"properties" : {
"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",
"store" : true
},
"content_length" : {
"type" : "integer"
},
"language" : {
"type" : "string"
}
}
}
}
}
}
}
}

I get the following output when http://localhost:9200/test/person/_search?pretty=1

{
"took" : 6,
"timed_out" : false,
"_shards" : {
"total" : 5,
"successful" : 5,
"failed" : 0
},
"hits" : {
"total" : 1,
"max_score" : 1.0,
"hits" : [ {
"_index" : "test",
"_type" : "person",
"_id" : "1",
"_score" : 1.0,
"_source" : {
"file" : "IkdvZCBTYXZlIHRoZSBRdWVlbiIgKGFsdGVybmF0aXZlbHkgIkdvZCBTYXZlIHRoZSBLaW5nIg=="
}
} ]
}
}

thanks for any suggestion.


(David Pilato) #2

Nothing is wrong here. What do you expect?


(system) #3