[
https://issues.apache.org/jira/browse/SOLR-9098?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15278301#comment-15278301
]
Stefan Matheis (steffkes) commented on SOLR-9098:
-------------------------------------------------
Okay, so probably [this part of Varun's
comment|https://issues.apache.org/jira/browse/SOLR-8386?focusedCommentId=15048595&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-15048595]
gives a hint:
bq. In trunk , if no schema factory is specified then ManagedIndexSchemaFactory
is used by default.
sounds a bit like "if no factory is specified, no information about it is
included in the response .." but i'd have to check the relevant code once i get
there.
so rather than introduce a new key in the response for {{/schema}} as my patch
suggested we should try to get the bits for {{/config}} back in and extend the
existing check.
> Show if schema is currently mutable or not
> ------------------------------------------
>
> Key: SOLR-9098
> URL: https://issues.apache.org/jira/browse/SOLR-9098
> Project: Solr
> Issue Type: Improvement
> Components: Schema and Analysis
> Reporter: Stefan Matheis (steffkes)
> Assignee: Stefan Matheis (steffkes)
> Priority: Minor
> Fix For: master (7.0)
>
> Attachments: SOLR-9098.patch
>
>
> When our schema is not mutable (for whatever reason) the only way to get that
> information is to try a change and see if it fails, like this:
> {code}$ curl -i localhost:8983/solr/dummy/schema -d '{ "add-field":{
> "name":"sell-by", "type":"tdate", "stored":true } }'
> HTTP/1.1 200 OK
> Content-Type: application/json; charset=UTF-8
> Content-Length: 112
> {
> "responseHeader":{
> "status":0,
> "QTime":5
> },
> "errors":[
> {
> "errorMessages":"schema is not editable"
> }
> ]
> }{code}
> this message is caused by {{SchemaManager#performOperations}} which checks if
> {{schema instanceof ManagedIndexSchema && schema.isMutable()}} - we could
> include that information in the response for {{/schema}} and allow users to
> see upfront if they could modify the schema or rather not.
> [~steve_rowe] i'm not entirely sure that i didn't miss any tests related to
> the schema handler, would you mind having a look?
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]