Class V2Request.Builder
- java.lang.Object
-
- org.apache.solr.client.solrj.request.V2Request.Builder
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description V2Request
build()
V2Request.Builder
forceV2(boolean flag)
Only for testing.V2Request.Builder
useBinary(boolean flag)
V2Request.Builder
withMethod(SolrRequest.METHOD m)
V2Request.Builder
withMimeType(String mimeType)
V2Request.Builder
withParams(SolrParams params)
V2Request.Builder
withPayload(Object payload)
V2Request.Builder
withPayload(String payload)
Set payload for request.V2Request.Builder
withResponseParser(ResponseParser parser)
-
-
-
Constructor Detail
-
Builder
public Builder(String resource)
Create a Builder object based on the provided resource. The default method is GET.- Parameters:
resource
- resource of the request for example "/collections" or "/cores/core-name"
-
-
Method Detail
-
withMethod
public V2Request.Builder withMethod(SolrRequest.METHOD m)
-
forceV2
public V2Request.Builder forceV2(boolean flag)
Only for testing. It's always true otherwise
-
withPayload
public V2Request.Builder withPayload(String payload)
Set payload for request.- Parameters:
payload
- as UTF-8 String- Returns:
- builder object
-
withPayload
public V2Request.Builder withPayload(Object payload)
-
withParams
public V2Request.Builder withParams(SolrParams params)
-
useBinary
public V2Request.Builder useBinary(boolean flag)
-
withResponseParser
public V2Request.Builder withResponseParser(ResponseParser parser)
-
withMimeType
public V2Request.Builder withMimeType(String mimeType)
-
build
public V2Request build()
-
-