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

PreAnalyzedField can cause managed schema corruption

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 6.2, 6.3
    • Fix Version/s: 6.4, 7.0
    • Component/s: Schema and Analysis
    • Security Level: Public (Default Security Level. Issues are Public)
    • Labels:
      None

      Description

      The exception as follows:
      Caused by: org.apache.solr.common.SolrException: Could not load conf for core test_shard1_replica1: Can't load schema managed-schema: Plugin init failure for [schema.xml] fieldType "preanalyzed": Cannot load analyzer: org.apache.solr.schema.PreAnalyzedField$PreAnalyzedAnalyzer
      at org.apache.solr.core.ConfigSetService.getConfig(ConfigSetService.java:85)
      at org.apache.solr.core.CoreContainer.create(CoreContainer.java:1031)
      ... 6 more
      Caused by: org.apache.solr.common.SolrException: Can't load schema managed-schema: Plugin init failure for [schema.xml] fieldType "preanalyzed": Cannot load analyzer: org.apache.solr.schema.PreAnalyzedField$PreAnalyzedAnalyzer
      at org.apache.solr.schema.IndexSchema.readSchema(IndexSchema.java:600)
      at org.apache.solr.schema.IndexSchema.<init>(IndexSchema.java:183)
      at org.apache.solr.schema.ManagedIndexSchema.<init>(ManagedIndexSchema.java:104)
      at org.apache.solr.schema.ManagedIndexSchemaFactory.create(ManagedIndexSchemaFactory.java:172)
      at org.apache.solr.schema.ManagedIndexSchemaFactory.create(ManagedIndexSchemaFactory.java:45)
      at org.apache.solr.schema.IndexSchemaFactory.buildIndexSchema(IndexSchemaFactory.java:75)
      at org.apache.solr.core.ConfigSetService.createIndexSchema(ConfigSetService.java:107)
      at org.apache.solr.core.ConfigSetService.getConfig(ConfigSetService.java:78)
      ... 7 more

      Test procedure:
      1.create collection using sample_techproducts_configs;
      2.add field in Solr web view;
      3.add field again in Solr web view.
      manage-schema is modifyed as follows:
      <fieldType name="preanalyzed" class="solr.PreAnalyzedField">
      <analyzer class=" org.apache.solr.schema.PreAnalyzedField$PreAnalyzedAnalyzer">
      </analyzer>
      </fieldType>

        Attachments

        1. SOLR-9751.patch
          8 kB
          Steve Rowe
        2. SOLR-9751.patch
          17 kB
          Steve Rowe
        3. SOLR-9751.patch
          15 kB
          Steve Rowe

          Issue Links

            Activity

              People

              • Assignee:
                steve_rowe Steve Rowe
                Reporter:
                liuyang@huawei liuyang
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: