Package org.apache.solr.client.solrj.request.json

## Class DirectJsonQueryRequest

- java.lang.Object
- - org.apache.solr.client.solrj.SolrRequest<QueryResponse>
  - - org.apache.solr.client.solrj.request.QueryRequest
    - - org.apache.solr.client.solrj.request.json.DirectJsonQueryRequest

All Implemented Interfaces:
  `Serializable`

    public class DirectJsonQueryRequest
    extends QueryRequest

Represents a query using the JSON Query DSL

This class doesn't construct the request body itself. It uses a provided String without any modification. Often used in combination with the JSON DSL's macro expansion capabilities. The JSON body can contain template parameters which are replaced with values fetched from the `SolrParams` used by this request. For a more flexible, guided approach to constructing JSON DSL requests, see `JsonQueryRequest`.

See Also:
  Serialized Form

### Nested Class Summary

### Nested classes/interfaces inherited from class org.apache.solr.client.solrj.SolrRequest

`SolrRequest.METHOD, SolrRequest.SolrClientContext, SolrRequest.SolrRequestType`

### Field Summary

### Fields inherited from class org.apache.solr.client.solrj.SolrRequest

`SUPPORTED_METHODS, useBinaryV2, usev2`

### Constructor Summary

Constructors
`DirectJsonQueryRequest​(String jsonString)`
`DirectJsonQueryRequest​(String jsonString, SolrParams params)`

### Method Summary

All Methods Instance Methods Concrete Methods
`RequestWriter.ContentWriter` `getContentWriter​(String expectedType)` If a request object wants to do a push write, implement this method.

### Methods inherited from class org.apache.solr.client.solrj.request.QueryRequest

`createResponse, getParams, getPath, getRequestType`

### Methods inherited from class org.apache.solr.client.solrj.SolrRequest

`addHeader, getBasePath, getBasicAuthPassword, getBasicAuthUser, getCollection, getContentStreams, getHeaders, getMethod, getPreferredNodes, getQueryParams, getResponseParser, getStreamingResponseCallback, getUserPrincipal, process, process, setBasePath, setBasicAuthCredentials, setMethod, setPath, setPreferredNodes, setQueryParams, setResponseParser, setStreamingResponseCallback, setUseBinaryV2, setUserPrincipal, setUseV2`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Constructor Detail

#### DirectJsonQueryRequest

    public DirectJsonQueryRequest​(String jsonString)

#### DirectJsonQueryRequest

    public DirectJsonQueryRequest​(String jsonString,
                                  SolrParams params)

### Method Detail

#### getContentWriter

    public RequestWriter.ContentWriter getContentWriter​(String expectedType)

Description copied from class: `SolrRequest`
If a request object wants to do a push write, implement this method.

Overrides:
  `getContentWriter` in class `SolrRequest<QueryResponse>`
Parameters:
  `expectedType` - This is the type that the RequestWriter would like to get. But, it is OK to send any format