I want to store Json
data as a value to an field, currently I have tried keeping that field type as string
or text
, which is fine but the Json is stored in string and hence the double quotes(")
are escaped inside that, so what field type need to be kept for Json Object ?
Eg, suppose my field is Thumbnail
and it should be stored and display as json object instead of string like below
"Thumbnail": {
"Url": "http://www.example.com/image/481989943",
"Height": 125,
"Width": "100"
}
You can store it as String. The issue you are facing - I assume - is when you want to return that JSON as structure within the Solr JSON response. By default Solr does not know that you want to embed the content rather than present it.
To tell it otherwise, try using a [json] document transformer in your fl parameter.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With