I am working with Elasticsearch and I need to query value from the document which stored as JSON formatted string.
Is there any option to query form Elasticsearch which stored JSON formatted string?
Please see my use case
I am saving my application data in Cassandra and replicating these data to elastic search (I am using elassandra bundled version for it). But in Cassandra, I have a field with list<text>
and it holds JSON array with nested JSON objects.
When I map the Cassandra table to Elasticsearch (as per suggested by elassandra doc) it mapping Cassandra field name as JSON key in Elasticsearch and entire JSON array considered as JSON formatted string.
Now I need to do the query based on the key inside the JSON which are stored as JSON string in Elasticsearch.
Please see the sample of my data stored in the Elasticsearch:
{
"status": {
\"visibilityStatus\": true,
\"deleteStatus\": true
}
}
Here status is Cassandra field name and remaining is the value of one record.
Now I need to search the record with deleteStatus=true
, any clue, please.
Thanks in advance