Details
-
Bug
-
Status: Resolved
-
Minor
-
Resolution: Fixed
-
4.7.2, 4.8
-
None
Description
Send a request to /field/analysis with the example jetty and you get a NPE
Request:
http://localhost:8983/solr/collection1/analysis/field
<response> <lst name="responseHeader"><int name="status">500</int><int name="QTime">2</int></lst><lst name="error"><str name="trace">java.lang.NullPointerException at org.apache.solr.schema.IndexSchema$DynamicReplacement$DynamicPattern$NameEndsWith.matches(IndexSchema.java:983) at org.apache.solr.schema.IndexSchema$DynamicReplacement.matches(IndexSchema.java:997) at org.apache.solr.schema.IndexSchema.getDynamicFieldType(IndexSchema.java:1244) at org.apache.solr.schema.IndexSchema.getFieldType(IndexSchema.java:1198) at org.apache.solr.handler.FieldAnalysisRequestHandler.handleAnalysisRequest(FieldAnalysisRequestHandler.java:189) at org.apache.solr.handler.FieldAnalysisRequestHandler.doAnalysis(FieldAnalysisRequestHandler.java:101) at org.apache.solr.handler.AnalysisRequestHandlerBase.handleRequestBody(AnalysisRequestHandlerBase.java:60) at org.apache.solr.handler.RequestHandlerBase.handleRequest(RequestHandlerBase.java:135) at org.apache.solr.core.RequestHandlers$LazyRequestHandlerWrapper.handleRequest(RequestHandlers.java:241) at org.apache.solr.core.SolrCore.execute(SolrCore.java:1962) at org.apache.solr.servlet.SolrDispatchFilter.execute(SolrDispatchFilter.java:774) </str><int name="code">500</int></lst> </response>
We should fix it to return a proper BAD_REQUEST error message.