Hi,
I'm trying to implement my first Elasticsearch not get it to work and search for content of a file. I used an example found on the web .
First I created the mapping :
PUT /attachment_sample1
{
"mappings": {
"files": {
"properties": {
"my_attachments" : { "type": "attachment" },
"title": { "type": "string" }
}
}
}
}
Then I added a file in B64 :
PUT /attachment_sample1/files/1
{
"title": "title",
"my_attachments" : ".... b64 ...."
}
And then I try to search for the file contents :
POST /attachment_sample1/files/_search
{
"query": {
"term": {
"my_attachments": "String"
}
}
}
If I search for the title , siq ue is my record, but not content .
POST /attachment_sample1/files/_search
{
"query": {
"term": {
"title": "String"
}
}
}
I have the plugins installed and that is not what I wrong .
Please , you can help me? Thank you.