How to search a encoded content


(Radhasankar C) #1

I indexed a base64 encoded content wih pipeline attachment;
curl -XGET 'http://localhost:9200/myindex2/my_type/my_id?pretty'
shows me the index like

 "_source" : {
    "data" : "e1xydGYxXGFuc2kNCkxvcmVtIGlwc3VtIGRvbG9yIHNpdCBhbWV0DQpccGFyIH0=", 
      "attachment" : {  "content_type" : "application/rtf",   "content" : "Lorem ipsum dolor sit amet" ..}
                     } ....

I tried to do search the content 'dolor' using below command but i did not get the result. Could you please give the command to search the content ?
curl -XGET 'http://localhost:9200/my_index2/_search?q=content:dolor'

Elastic search version i installed in 5.0.1


(David Pilato) #2

try with attachment.content instead


(Radhasankar C) #3

Thanks David.. attachment.content is working..


(system) #4

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.