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

Solr Schema - version number requirements

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Reopened
    • Minor
    • Resolution: Unresolved
    • 1.2
    • None
    • None
    • None

    Description

      When I change the version number of the solr schema from 1.0 or 1.1 to something arbitrary like say 0.8.1 - solr reports a parsing error with the schema - however, a version number "0.8" is accepted. It would be nice if solr reporting an "invalid schema version" error instead or atleast put something in the log that has a bit more detail.

      You could add in a check in src/java/org/apache/solr/schema/IndexSchema.java that might look like this:

      Node node = (Node) xpath.evaluate("/schema/@version", document, XPathConstants.NODE);
      if (!("1.0".equals(node) || "1.1".equals(node)))

      { log.warning("invalid schema version - use 1.0 or 1.1 only"); }

      It's quite poor to hardcode the version numbers - but I thought I should include something to give you a more concrete idea of what I am talking about.

      Attachments

        Issue Links

          Activity

            People

              hossman Chris M. Hostetter
              asnagy Andrew Nagy
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated: