Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Trivial Trivial
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: None
    • Labels:
      None

      Description

      When you get the index info for an index with fields not in the schema, you get an NPE. Here is the culprit:
      [51] FieldType fieldType = schema.getFieldTypeNoEx(fieldName);
      [52] fieldInfo.put("type", fieldType.getTypeName());

        Activity

        Hide
        Erik Hatcher added a comment -

        applied, thanks Ryan!

        Show
        Erik Hatcher added a comment - applied, thanks Ryan!
        Hide
        Ryan McKinley added a comment -

        Here is a patch fixing the NPE. It also changes the handler to extend RequestHandlerBase and uses generics where appropriate.

        While we are at it, I think it would be good to move this handler from:
        org.apache.solr.request
        to
        org.apache.solr.handler

        Moving the class should not affect anyone since solrconfig.xml references "solr.IndexInfoRequestHandler" and I doubt anyone has implemented a custom handler extending this class.

        Show
        Ryan McKinley added a comment - Here is a patch fixing the NPE. It also changes the handler to extend RequestHandlerBase and uses generics where appropriate. While we are at it, I think it would be good to move this handler from: org.apache.solr.request to org.apache.solr.handler Moving the class should not affect anyone since solrconfig.xml references "solr.IndexInfoRequestHandler" and I doubt anyone has implemented a custom handler extending this class.

          People

          • Assignee:
            Erik Hatcher
            Reporter:
            Ryan McKinley
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development