In EmbeddedSolrServer.request(), a SolrQueryRequest (`req') is created
and some of the information from the SolrRequest passed in as a
parameter named `request' are copied from request to req, before req is
passed as a parameter to core.execute().
One thing that is not copied from the SolrRequest to the
SolrQueryRequest is the http method (POST/GET). This leads to some
requests being handled differently by the remote and the embedded
server. In particular, SchemaRequests simply return a JSON description
of the schema instead of modifying it because they are treated as GET
requests rather than POST requests by SchemaHandler.handleRequestBody().
Adding a single line:
req.getContext().put("httpMethod", request.getMethod().name());
in EmbeddedSolrServer.request() fixes the problem for me.
I would have created a JIRA issue but it seems I can't create issues for
the Solr project in the ASF JIRA: Solr simply doesn't appear in the list
of projects on the issue creation dialog.
I'm not attaching a patch as the solution is trivial and I'm not sure
this mailing list allows attachments.
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]