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

## Class QueryRequest

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

All Implemented Interfaces:
  `Serializable`

Direct Known Subclasses:
  `DirectJsonQueryRequest`, `JsonQueryRequest`

    public class QueryRequest
    extends SolrRequest<QueryResponse>

Since:
  solr 1.3
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
`QueryRequest()`
`QueryRequest​(SolrParams q)`
`QueryRequest​(SolrParams q, SolrRequest.METHOD method)`

### Method Summary

All Methods Instance Methods Concrete Methods
`protected QueryResponse` `createResponse​(SolrClient client)` Create a new SolrResponse to hold the response from the server
`SolrParams` `getParams()`
`String` `getPath()` Use the params 'QT' parameter if it exists
`String` `getRequestType()` This method defines the type of this Solr request.

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

`addHeader, addHeaders, getBasePath, getBasicAuthPassword, getBasicAuthUser, getCollection, getContentStreams, getContentWriter, 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

#### QueryRequest

    public QueryRequest()

#### QueryRequest

    public QueryRequest​(SolrParams q)

#### QueryRequest

    public QueryRequest​(SolrParams q,
                        SolrRequest.METHOD method)

### Method Detail

#### getPath

    public String getPath()

Use the params 'QT' parameter if it exists

Overrides:
  `getPath` in class `SolrRequest<QueryResponse>`

#### createResponse

    protected QueryResponse createResponse​(SolrClient client)

Description copied from class: `SolrRequest`
Create a new SolrResponse to hold the response from the server

Specified by:
  `createResponse` in class `SolrRequest<QueryResponse>`
Parameters:
  `client` - the `SolrClient` the request will be sent to

#### getParams

    public SolrParams getParams()

Specified by:
  `getParams` in class `SolrRequest<QueryResponse>`

#### getRequestType

    public String getRequestType()

Description copied from class: `SolrRequest`
This method defines the type of this Solr request.

Specified by:
  `getRequestType` in class `SolrRequest<QueryResponse>`