Uploaded image for project: 'Solr'
  1. Solr
  2. SOLR-8386

The new admin UI doesn't understand that managed schemas are the default in 6.0

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 6.0
    • Fix Version/s: 6.0
    • Component/s: Admin UI
    • Labels:
      None

      Description

      SOLR-8131 makes managed schema the default in Solr 6.0. So the "add field" & etc buttons aren't being shown in the schema link as they are in 5.x (5.4+).

      Note, all the configsets in 5.5+ are managed, as they are in 6.x The difference is that you do not need to specify anything special in 6x.

      So whatever the key that determines whether the admin UI knows the schema is managed or not probably needs to be updated.

      Upayavira any hints here?

        Activity

        Hide
        varunthacker Varun Thacker added a comment -

        The difference is that you do not need to specify anything special in 6x.

        The difference is that when no schemaFactory is specified in the solrconfig.xml file then ManagedSchemaFactory will be used as opposed to ClassicSchemaFactory starting 6.0

        Show
        varunthacker Varun Thacker added a comment - The difference is that you do not need to specify anything special in 6x. The difference is that when no schemaFactory is specified in the solrconfig.xml file then ManagedSchemaFactory will be used as opposed to ClassicSchemaFactory starting 6.0
        Hide
        upayavira Upayavira added a comment -

        This is what does it:

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

        i.e. it calls the config API, and looks to see what schema factory is configured. If it is the Managed one, then it switches on those buttons.

        Config.get() calls /solr/<collection>/config - what do you get from calling that URL, especially inside config.schemaFactory?

        Show
        upayavira Upayavira added a comment - This is what does it: Config.get({core: $routeParams.core}, function(data) { $scope.isSchemaUpdatable = data.config.schemaFactory.class == "ManagedIndexSchemaFactory" ; }); i.e. it calls the config API, and looks to see what schema factory is configured. If it is the Managed one, then it switches on those buttons. Config.get() calls /solr/<collection>/config - what do you get from calling that URL, especially inside config.schemaFactory?
        Hide
        varunthacker Varun Thacker added a comment -

        Hi Upayavira ,

        In trunk , if no schema factory is specified then ManagedIndexSchemaFactory is used by default.

        With some googling , I modified the check to be this $scope.isSchemaUpdatable = (data.config.hasOwnProperty('schemaFactory') == false || data.config.schemaFactory.class == "ManagedIndexSchemaFactory"); and the add field option appears with the change.

        Show
        varunthacker Varun Thacker added a comment - Hi Upayavira , In trunk , if no schema factory is specified then ManagedIndexSchemaFactory is used by default. With some googling , I modified the check to be this $scope.isSchemaUpdatable = (data.config.hasOwnProperty('schemaFactory') == false || data.config.schemaFactory.class == "ManagedIndexSchemaFactory"); and the add field option appears with the change.
        Hide
        upayavira Upayavira added a comment -

        Fantastic - commit it!!

        Show
        upayavira Upayavira added a comment - Fantastic - commit it!!
        Hide
        jira-bot ASF subversion and git services added a comment -

        Commit 1718849 from Varun Thacker in branch 'dev/trunk'
        [ https://svn.apache.org/r1718849 ]

        SOLR-8386: Add field option in the admin ui loads up even when no schemaFactory has been specified since the default is ManagedIndexSchemaFactory

        Show
        jira-bot ASF subversion and git services added a comment - Commit 1718849 from Varun Thacker in branch 'dev/trunk' [ https://svn.apache.org/r1718849 ] SOLR-8386 : Add field option in the admin ui loads up even when no schemaFactory has been specified since the default is ManagedIndexSchemaFactory
        Hide
        varunthacker Varun Thacker added a comment -

        Thanks Upayavira for pointing out where to fix and Erick for reporting the issue!

        Show
        varunthacker Varun Thacker added a comment - Thanks Upayavira for pointing out where to fix and Erick for reporting the issue!

          People

          • Assignee:
            varunthacker Varun Thacker
            Reporter:
            erickerickson Erick Erickson
          • Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development