Package org.apache.solr.request
Interface SolrQueryRequest
-
- All Superinterfaces:
AutoCloseable
- All Known Implementing Classes:
DelegatedSolrQueryRequest
,DelegatingSolrQueryRequest
,LocalSolrQueryRequest
,SolrQueryRequestBase
public interface SolrQueryRequest extends AutoCloseable
Container for a request to execute a query.SolrQueryRequest
is not thread safe.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description void
close()
This method should be called when all uses of this request are finished, so that resources can be freed.default CloudDescriptor
getCloudDescriptor()
default List<org.apache.solr.common.util.CommandOperation>
getCommands(boolean validateInput)
Only for v2 API if the request contains a command payload, it's parsed and returned as a list of CommandOperation objectsIterable<org.apache.solr.common.util.ContentStream>
getContentStreams()
A Collection of ContentStreams passed to the requestMap<Object,Object>
getContext()
Generic information associated with this request that may be both read and updated.SolrCore
getCore()
The solr core (coordinator, etc) associated with this requestdefault CoreContainer
getCoreContainer()
default String
getHttpMethod()
default HttpSolrCall
getHttpSolrCall()
Map<String,Object>
getJSON()
Returns any associated JSON (or null if none) in deserialized generic form.org.apache.solr.common.params.SolrParams
getOriginalParams()
Returns the original request parameters.org.apache.solr.common.params.SolrParams
getParams()
returns the current request parametersString
getParamString()
Returns a string representing all the important parameters.default String
getPath()
default Map<String,String>
getPathTemplateValues()
Only for V2 API.RTimerTree
getRequestTimer()
The timer for this request, created when the request started being processedIndexSchema
getSchema()
The schema snapshot from core.getLatestSchema() at request creation.SolrIndexSearcher
getSearcher()
The index searcher associated with this requestdefault io.opentracing.Span
getSpan()
The distributed tracing Span for the request itself; never null.long
getStartTime()
The start time of this request in milliseconds.default io.opentracing.Tracer
getTracer()
Distributed tracing Tracer.Principal
getUserPrincipal()
void
setJSON(Map<String,Object> json)
void
setParams(org.apache.solr.common.params.SolrParams params)
Change the parameters for this request.void
updateSchemaToLatest()
Replaces the current schema snapshot with the latest from the core.
-
-
-
Method Detail
-
getParams
org.apache.solr.common.params.SolrParams getParams()
returns the current request parameters
-
setParams
void setParams(org.apache.solr.common.params.SolrParams params)
Change the parameters for this request. This does not affect the original parameters returned by getOriginalParams()
-
getContentStreams
Iterable<org.apache.solr.common.util.ContentStream> getContentStreams()
A Collection of ContentStreams passed to the request
-
getOriginalParams
org.apache.solr.common.params.SolrParams getOriginalParams()
Returns the original request parameters. As this does not normally include configured defaults it's more suitable for logging.
-
getContext
Map<Object,Object> getContext()
Generic information associated with this request that may be both read and updated.
-
close
void close()
This method should be called when all uses of this request are finished, so that resources can be freed.- Specified by:
close
in interfaceAutoCloseable
-
getStartTime
long getStartTime()
The start time of this request in milliseconds. Use this only if you need the absolute system time at the start of the request, getRequestTimer() provides a more accurate mechanism for timing purposes.
-
getRequestTimer
RTimerTree getRequestTimer()
The timer for this request, created when the request started being processed
-
getSearcher
SolrIndexSearcher getSearcher()
The index searcher associated with this request
-
getCore
SolrCore getCore()
The solr core (coordinator, etc) associated with this request
-
getSchema
IndexSchema getSchema()
The schema snapshot from core.getLatestSchema() at request creation.
-
updateSchemaToLatest
void updateSchemaToLatest()
Replaces the current schema snapshot with the latest from the core.
-
getParamString
String getParamString()
Returns a string representing all the important parameters. Suitable for logging.
-
getJSON
Map<String,Object> getJSON()
Returns any associated JSON (or null if none) in deserialized generic form. Java classes used to represent the JSON are as follows: Map, List, String, Long, Double, Boolean
-
getUserPrincipal
Principal getUserPrincipal()
-
getPath
default String getPath()
-
getPathTemplateValues
default Map<String,String> getPathTemplateValues()
Only for V2 API. Returns a map of path segments and their values. For example, if the path is configured as /path/{segment1}/{segment2} and a reguest is made as /path/x/y the returned map would contain {segment1:x ,segment2:y}
-
getCommands
default List<org.apache.solr.common.util.CommandOperation> getCommands(boolean validateInput)
Only for v2 API if the request contains a command payload, it's parsed and returned as a list of CommandOperation objects- Parameters:
validateInput
- , If true it is validated against the json schema spec
-
getHttpMethod
default String getHttpMethod()
-
getHttpSolrCall
default HttpSolrCall getHttpSolrCall()
-
getTracer
default io.opentracing.Tracer getTracer()
Distributed tracing Tracer. Never null but might implementNoopTracer
.
-
getSpan
default io.opentracing.Span getSpan()
The distributed tracing Span for the request itself; never null. This is useful for adding tags or updating the operation name of the request span. If you need the current span, which might not necessarily be the request span, do this instead:tracer.activeSpan()
.
-
getCoreContainer
default CoreContainer getCoreContainer()
-
getCloudDescriptor
default CloudDescriptor getCloudDescriptor()
-
-