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 theSolrParams
used by this request. For a more flexible, guided approach to constructing JSON DSL requests, seeJsonQueryRequest
.- See Also:
- Serialized Form
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.apache.solr.client.solrj.SolrRequest
SolrRequest.METHOD
-
-
Field Summary
-
Fields inherited from class org.apache.solr.client.solrj.SolrRequest
SUPPORTED_METHODS, useBinaryV2, usev2
-
-
Constructor Summary
Constructors Constructor Description DirectJsonQueryRequest(String jsonString)
DirectJsonQueryRequest(String jsonString, SolrParams params)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description 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
-
Methods inherited from class org.apache.solr.client.solrj.SolrRequest
getBasePath, getBasicAuthPassword, getBasicAuthUser, getCollection, getContentStreams, getMethod, getQueryParams, getResponseParser, getStreamingResponseCallback, getUserPrincipal, process, process, setBasePath, setBasicAuthCredentials, setMethod, setPath, setQueryParams, setResponseParser, setStreamingResponseCallback, setUseBinaryV2, setUserPrincipal, setUseV2
-
-
-
-
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 classSolrRequest<QueryResponse>
- Parameters:
expectedType
- This is the type that the RequestWriter would like to get. But, it is OK to send any format
-
-