[
https://issues.apache.org/jira/browse/SOLR-7376?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Ryan McKinley updated SOLR-7376:
--------------------------------
Attachment: SOLR-7376-raw-json-xml-in-response.patch
Here is a patch with tests -- this adds two default document transformers:
{code}
+ defaultFactories.put( "json", new RawValueTransformerFactory("json") );
+ defaultFactories.put( "xml", new RawValueTransformerFactory("xml") );
{code}
The values are only unescaped when using the appropriate response writer.
So if you have:
&fl=id,name,json_s:[json],xml_s:[xml]&wt=json
the xml_s value would be escaped, but json_s would be a raw value.
> Allow DocTransformers to write directly to the response (support raw json/xml
> fields)
> -------------------------------------------------------------------------------------
>
> Key: SOLR-7376
> URL: https://issues.apache.org/jira/browse/SOLR-7376
> Project: Solr
> Issue Type: New Feature
> Reporter: Ryan McKinley
> Assignee: Ryan McKinley
> Attachments: SOLR-7376-raw-json-xml-in-response.patch
>
>
> In order to return raw json when wt=json (and raw xml when wt=xml), it would
> be great if we could output directly to the response.
> I propose we can put a new `WriteableValue` in the response using
> DocumentTransformer -- when a TextResponseWriter finds this type, it will let
> the `WriteableValue` figure out what to do.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]