[ 
https://issues.apache.org/jira/browse/SOLR-4503?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13593638#comment-13593638
 ] 

Steve Rowe edited comment on SOLR-4503 at 3/5/13 5:38 PM:
----------------------------------------------------------

(*edit* fixed location of {{ solrconfig.xml}})

{quote}
bq. Steven, that may be a dumb question, but all your sample files have 
Content-Type: text/plain; charset=UTF-8, is that only for demonstration? 
because if we follow the RFC4627 it'd be: application/json

Regarding JSON content type, this may be related to SOLR-1123 which makes the 
content-type configurable, but defaults to something that will display in a 
browser by default.
{quote}
Yes, by default, the JSON response writer is used, and its configuration in 
{{solr/example/solr/collection1/conf/solrconfig.xml}} (which I used to generate 
all the example responses attached to this issue) is:

{code:xml}
<queryResponseWriter name="json" class="solr.JSONResponseWriter">
   <!-- For the purposes of the tutorial, JSON responses are written as
    plain text so that they are easy to read in *any* browser.
    If you expect a MIME type of "application/json" just remove this override.
   -->
  <str name="content-type">text/plain; charset=UTF-8</str>
</queryResponseWriter>
{code}

                
      was (Author: steve_rowe):
    {quote}
bq. Steven, that may be a dumb question, but all your sample files have 
Content-Type: text/plain; charset=UTF-8, is that only for demonstration? 
because if we follow the RFC4627 it'd be: application/json

Regarding JSON content type, this may be related to SOLR-1123 which makes the 
content-type configurable, but defaults to something that will display in a 
browser by default.
{quote}
Yes, by default, the JSON response writer is used, and its configuration in 
{{solr/example/solrconfig.xml}} (which I used to generate all the example 
responses attached to this issue) is:

{code:xml}
<queryResponseWriter name="json" class="solr.JSONResponseWriter">
   <!-- For the purposes of the tutorial, JSON responses are written as
    plain text so that they are easy to read in *any* browser.
    If you expect a MIME type of "application/json" just remove this override.
   -->
  <str name="content-type">text/plain; charset=UTF-8</str>
</queryResponseWriter>
{code}

                  
> Add REST API methods to get schema information: fields, dynamicFields, 
> fieldTypes, and copyFields
> -------------------------------------------------------------------------------------------------
>
>                 Key: SOLR-4503
>                 URL: https://issues.apache.org/jira/browse/SOLR-4503
>             Project: Solr
>          Issue Type: Sub-task
>          Components: Schema and Analysis
>    Affects Versions: 4.1
>            Reporter: Steve Rowe
>            Assignee: Steve Rowe
>             Fix For: 4.2
>
>         Attachments: all.dynamic.fields.json, all.dynamic.fields.json, 
> all.fields.json, all.fields.json, all.field.types.json, all.field.types.json, 
> coordinate.dynamic.field.json, coordinate.dynamic.field.json, 
> copyfields.json, date.field.type.json, date.field.type.json, 
> price.field.json, price.field.json, SOLR-4503.patch, SOLR-4503.patch, 
> SOLR-4503.patch, SOLR-4503.patch
>
>
> Add REST methods that provide properties for fields, dynamicFields, 
> fieldTypes, and copyFields, using paths:
> /solr/(corename)/schema/fields
> /solr/(corename)/schema/fields/fieldname
> /solr/(corename)/schema/dynamicfields
> /solr/(corename)/schema/dynamicfields/pattern
> /solr/(corename)/schema/fieldtypes
> /solr/(corename)/schema/fieldtypes/typename 
> /solr/(corename)/schema/copyfields

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to