You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-dev@lucene.apache.org by "Ryan McKinley (JIRA)" <ji...@apache.org> on 2007/02/11 23:52:06 UTC

[jira] Created: (SOLR-157) IndexInfoRequestHandler NPE

IndexInfoRequestHandler NPE
---------------------------

                 Key: SOLR-157
                 URL: https://issues.apache.org/jira/browse/SOLR-157
             Project: Solr
          Issue Type: Bug
            Reporter: Ryan McKinley
            Priority: Trivial


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());


-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (SOLR-157) IndexInfoRequestHandler NPE

Posted by "Ryan McKinley (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/SOLR-157?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Ryan McKinley updated SOLR-157:
-------------------------------

    Attachment: SOLR-157-IndexInfoNPE.patch

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.


> IndexInfoRequestHandler NPE
> ---------------------------
>
>                 Key: SOLR-157
>                 URL: https://issues.apache.org/jira/browse/SOLR-157
>             Project: Solr
>          Issue Type: Bug
>            Reporter: Ryan McKinley
>            Priority: Trivial
>         Attachments: SOLR-157-IndexInfoNPE.patch
>
>
> 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());

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Resolved: (SOLR-157) IndexInfoRequestHandler NPE

Posted by "Erik Hatcher (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/SOLR-157?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Erik Hatcher resolved SOLR-157.
-------------------------------

    Resolution: Fixed

applied, thanks Ryan!

> IndexInfoRequestHandler NPE
> ---------------------------
>
>                 Key: SOLR-157
>                 URL: https://issues.apache.org/jira/browse/SOLR-157
>             Project: Solr
>          Issue Type: Bug
>            Reporter: Ryan McKinley
>         Assigned To: Erik Hatcher
>            Priority: Trivial
>         Attachments: SOLR-157-IndexInfoNPE.patch
>
>
> 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());

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Assigned: (SOLR-157) IndexInfoRequestHandler NPE

Posted by "Erik Hatcher (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/SOLR-157?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Erik Hatcher reassigned SOLR-157:
---------------------------------

    Assignee: Erik Hatcher

> IndexInfoRequestHandler NPE
> ---------------------------
>
>                 Key: SOLR-157
>                 URL: https://issues.apache.org/jira/browse/SOLR-157
>             Project: Solr
>          Issue Type: Bug
>            Reporter: Ryan McKinley
>         Assigned To: Erik Hatcher
>            Priority: Trivial
>         Attachments: SOLR-157-IndexInfoNPE.patch
>
>
> 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());

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.