Very wired here.
here is my env:
http://localhost:9200/_nodes/plugins?pretty
{
"cluster_name" : "elasticsearch",
"nodes" : {
"hYCvRc1yQSK3BoClf5C5zQ" : {
"name" : "Destroyer of Demons",
"transport_address" : "127.0.0.1:9300",
"host" : "127.0.0.1",
"ip" : "127.0.0.1",
"version" : "**2.3.1"**,
"build" : "bd98092",
"http_address" : "127.0.0.1:9200",
"plugins" : [ {
"name" : "**mapper-attachments**",
"version" : **"2.3.1",**
...
} ],
mapping is:
"tech": {
"mappings": {
"manual": {
"properties": {
"file": {
"type": "attachment",
"fields": {
"content": {
"type": "string"
},
"author": {
"type": "string"
},
"**title**": {
"type": "string",
"store": true
},
"**name**": {
"type": "string"
},
"date": {
"type": "string",
"store": true
},
"**keywords**": {
"type": "string",
"store": true
},
"**content_type**": {
"type": "string",
"store": true
},
"content_length": {
"type": "string",
"store": true
},
"**language**": {
"type": "string",
"store": true
}
}
}
}
}
I am able to see the content of the indexed document:
"_source": {
"file": {
"_content": "JVBERi0xLjcNJeLjz9MNCg==M......=ZW5kc3RyZWFtDWVuZG9iag1zdGFydHhyZWYNCg==MTE2DQo=JSVFT0YNCg=="
"_name": "12-240.pdf",
"_title": "12-240.pdf",
"_keywords": "Div42 Src580 LGE Mechtech",
"_language": "en",
"_content_type": "pdf"
}
but when I search
curl -XGET "http://localhost:9200/tech/manual/_search" -d'
{
"fields": ["file.content_type", "file.title", "file.keywords", "file.language", "file.name"],
"query": {
"match_all": {}
}
}'
the response has no file.keywords, file.language, and file.name as follow, I also can't search on these fields.
"hits": {
"total": 1,
"max_score": 0.30685282,
"hits": [
{
"_index": "tech",
"_type": "manual",
"_id": "AVPx8cRH4bGZ_KKaUS0y",
"_score": 0.30685282,
"fields": {
"file.content_type": [
"pdf"
],
"file.title": [
"12-240"
]
}
}
]
}
what's possible not right?
Thanks!