Class CreateCollectionAPI.CreateCollectionRequestBody

  • All Implemented Interfaces:
    org.apache.solr.common.MapSerializable, org.apache.solr.common.MapWriter, org.apache.solr.common.NavigableObject, JacksonReflectMapWriter, org.noggit.JSONWriter.Writable
    Enclosing class:
    CreateCollectionAPI

    public static class CreateCollectionAPI.CreateCollectionRequestBody
    extends Object
    implements JacksonReflectMapWriter
    Request body for v2 "create collection" requests
    • Constructor Detail

      • CreateCollectionRequestBody

        public CreateCollectionRequestBody()
    • Method Detail

      • validate

        public void validate()
      • addToRemoteMessageWithPrefix

        public void addToRemoteMessageWithPrefix​(Map<String,​Object> remoteMessage,
                                                 String prefix)
      • convertV2CreateCollectionMapToV1ParamMap

        public static void convertV2CreateCollectionMapToV1ParamMap​(Map<String,​Object> v2MapVals)
        Convert a map representing the v2 request body into v1-appropriate query-parameters.

        Most v2 APIs using the legacy (i.e. non-JAX-RS) framework implement the v2 API by restructuring the provided parameters so that the v1 codepath can be called. This utility method is provided in pursuit of that usecase. It's not used directly CreateCollectionAPI, which uses the JAX-RS framework, but it's kept here so that logic surrounding collection-creation parameters can be kept in a single place.