How to filter json string field value


(Sonu Pajai Save) #1

in my elasticsearch index it has pagedata filed under message field which contains following data

message.PageData:
{"survey_details":{"survey_status":0,"survey_ref_id":1,"skip_status":0,"question_count":21,"survey_open_date":"10-08-2018","survey_close_date":"16-11-

pagedata can be string or hash thats why i havent applied filter over page data

i there any way to search survey_status":0, & "survey_ref_id":1, located in json string field


(Marius Dragomir) #2

Depending on how it's stored in Elasticsearch it would be pretty hard to figure out a filter for that data. Best option would have been to use nested fields and ingest the whole json separately, having fields likemessage.pagedata.surveydetails.survey_status and so on.


(Sonu Pajai Save) #3

its stored as string, but want to use it like json/hash