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

EmbeddedSolrServer does not support SchemaAPI

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 6.4.1
    • Fix Version/s: 6.5, 7.0
    • Component/s: Server, SolrJ
    • Security Level: Public (Default Security Level. Issues are Public)
    • Labels:

      Description

      The EmbeddedSolrServer server does not support calls to the POST methods of SchemaAPI using SolRJ api. The reason is that the httpMethod param is never set by the EmbeddedSolrServer#request(SolrRequest, String) and this is later required by the SchemaHandler class that actually performs the call at SchemaHandler#handleRequestBody(SolrQueryRequest, SolrQueryResponse).

      Proposal is to enhance the EmbeddedSolrServer to forward the httpMethod at aprox row 174 with the following: "req.getContext().put("httpMethod", request.getMethod().name());". This change requires the Factory methods of SolrJ to add the intended method to be used example : new SchemaRequest.AddField(....) should append the POST method similar to how the SchemaRequest.Field appends the GET method.

      I have written a separate EmbeddedSolrServer that replaces the one in SolR. It works for now and fields can be created on the fly using the SchemaAPI of the solrj client, but would like to be able to remove this workaround.

        Attachments

        1. SOLR-10134.patch
          1 kB
          Robert Alexandersson
        2. SOLR-10134.patch
          9 kB
          Mikhail Khludnev
        3. SOLR-10134.patch
          14 kB
          Mikhail Khludnev

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                robert_alex Robert Alexandersson
              • Votes:
                0 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Time Tracking

                  Estimated:
                  Original Estimate - 2h
                  2h
                  Remaining:
                  Remaining Estimate - 2h
                  2h
                  Logged:
                  Time Spent - Not Specified
                  Not Specified