lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Stefan Matheis (steffkes) (JIRA)" <>
Subject [jira] [Commented] (SOLR-9098) Show if schema is currently mutable or not
Date Tue, 10 May 2016 15:14:12 GMT


Stefan Matheis (steffkes) commented on SOLR-9098:

Thanks for mentioning that Steve! Further checking revealed, that the schema page already
does the following request:

{code}Config.get({core: $routeParams.core}, function(data) {
    $scope.isSchemaUpdatable = (data.config.hasOwnProperty('schemaFactory') == false || data.config.schemaFactory.class
== "ManagedIndexSchemaFactory");

looking at it, i was following to SOLR-8386 - so i'd say somewhere in the past, it was already
there and probably got lost again?

Reading through {{ManagedIndexSchemaFactory}} i got the impression that it's not entirely
impossible to have a immutable schema while using it - which would imply that we'd need another
check, instead of just checking for the class in use. or am i mistaken here?

> Show if schema is currently mutable or not
> ------------------------------------------
>                 Key: SOLR-9098
>                 URL:
>             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

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message