Package org.apache.solr.request
Class SolrQueryRequestBase
- java.lang.Object
- 
- org.apache.solr.request.SolrQueryRequestBase
 
- 
- All Implemented Interfaces:
- Closeable,- AutoCloseable,- SolrQueryRequest
 - Direct Known Subclasses:
- LocalSolrQueryRequest
 
 public abstract class SolrQueryRequestBase extends Object implements SolrQueryRequest, Closeable Base implementation ofSolrQueryRequestthat provides some convenience methods for accessing parameters, and manages an IndexSearcher reference.The close()method must be called on any instance of this class once it is no longer in use.
- 
- 
Field SummaryFields Modifier and Type Field Description protected Map<Object,Object>contextprotected SolrCorecoreprotected Map<String,Object>jsonprotected SolrParamsorigParamsprotected SolrParamsparamsprotected IndexSchemaschemaprotected RefCounted<SolrIndexSearcher>searcherHolderprotected longstartTimeprotected Iterable<ContentStream>streams
 - 
Constructor SummaryConstructors Constructor Description SolrQueryRequestBase(SolrCore core, SolrParams params)SolrQueryRequestBase(SolrCore core, SolrParams params, RTimerTree requestTimer)
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()Frees resources associated with this request, this method must be called when the object is no longer in use.List<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<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.SolrCoregetCore()The solr core (coordinator, etc) associated with this requestMap<String,Object>getJSON()Returns any associated JSON (or null if none) in deserialized generic form.SolrParamsgetOriginalParams()Returns the original request parameters.SolrParamsgetParams()returns the current request parametersStringgetParamString()Returns a string representing all the important parameters.RTimerTreegetRequestTimer()The timer for this request, created when the request started being processedIndexSchemagetSchema()The schema snapshot from core.getLatestSchema() at request creation.SolrIndexSearchergetSearcher()The index searcher associated with this requestio.opentracing.SpangetSpan()The distributed tracing Span for the request itself; never null.protected ValidatingJsonMapgetSpec()longgetStartTime()The start time of this request in milliseconds.io.opentracing.TracergetTracer()Distributed tracing Tracer.PrincipalgetUserPrincipal()protected Map<String,JsonSchemaValidator>getValidators()voidsetContentStreams(Iterable<ContentStream> s)voidsetJSON(Map<String,Object> json)voidsetParams(SolrParams params)Change the parameters for this request.StringtoString()voidupdateSchemaToLatest()Replaces the current schema snapshot with the latest from the core.- 
Methods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 - 
Methods inherited from interface org.apache.solr.request.SolrQueryRequestgetHttpMethod, getHttpSolrCall, getPath, getPathTemplateValues
 
- 
 
- 
- 
- 
Field Detail- 
coreprotected final SolrCore core 
 - 
origParamsprotected final SolrParams origParams 
 - 
schemaprotected volatile IndexSchema schema 
 - 
paramsprotected SolrParams params 
 - 
streamsprotected Iterable<ContentStream> streams 
 - 
startTimeprotected final long startTime 
 - 
searcherHolderprotected RefCounted<SolrIndexSearcher> searcherHolder 
 
- 
 - 
Constructor Detail- 
SolrQueryRequestBasepublic SolrQueryRequestBase(SolrCore core, SolrParams params, RTimerTree requestTimer) 
 - 
SolrQueryRequestBasepublic SolrQueryRequestBase(SolrCore core, SolrParams params) 
 
- 
 - 
Method Detail- 
getContextpublic Map<Object,Object> getContext() Description copied from interface:SolrQueryRequestGeneric information associated with this request that may be both read and updated.- Specified by:
- getContextin interface- SolrQueryRequest
 
 - 
getParamspublic SolrParams getParams() Description copied from interface:SolrQueryRequestreturns the current request parameters- Specified by:
- getParamsin interface- SolrQueryRequest
 
 - 
getOriginalParamspublic SolrParams getOriginalParams() Description copied from interface:SolrQueryRequestReturns the original request parameters. As this does not normally include configured defaults it's more suitable for logging.- Specified by:
- getOriginalParamsin interface- SolrQueryRequest
 
 - 
setParamspublic void setParams(SolrParams params) Description copied from interface:SolrQueryRequestChange the parameters for this request. This does not affect the original parameters returned by getOriginalParams()- Specified by:
- setParamsin interface- SolrQueryRequest
 
 - 
getStartTimepublic long getStartTime() Description copied from interface:SolrQueryRequestThe 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.- Specified by:
- getStartTimein interface- SolrQueryRequest
 
 - 
getRequestTimerpublic RTimerTree getRequestTimer() Description copied from interface:SolrQueryRequestThe timer for this request, created when the request started being processed- Specified by:
- getRequestTimerin interface- SolrQueryRequest
 
 - 
getSearcherpublic SolrIndexSearcher getSearcher() Description copied from interface:SolrQueryRequestThe index searcher associated with this request- Specified by:
- getSearcherin interface- SolrQueryRequest
 
 - 
getCorepublic SolrCore getCore() Description copied from interface:SolrQueryRequestThe solr core (coordinator, etc) associated with this request- Specified by:
- getCorein interface- SolrQueryRequest
 
 - 
getSchemapublic IndexSchema getSchema() Description copied from interface:SolrQueryRequestThe schema snapshot from core.getLatestSchema() at request creation.- Specified by:
- getSchemain interface- SolrQueryRequest
 
 - 
getTracerpublic io.opentracing.Tracer getTracer() Description copied from interface:SolrQueryRequestDistributed tracing Tracer. Never null but might implementNoopTracer.- Specified by:
- getTracerin interface- SolrQueryRequest
 
 - 
getSpanpublic io.opentracing.Span getSpan() Description copied from interface:SolrQueryRequestThe 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().- Specified by:
- getSpanin interface- SolrQueryRequest
 
 - 
updateSchemaToLatestpublic void updateSchemaToLatest() Description copied from interface:SolrQueryRequestReplaces the current schema snapshot with the latest from the core.- Specified by:
- updateSchemaToLatestin interface- SolrQueryRequest
 
 - 
closepublic void close() Frees resources associated with this request, this method must be called when the object is no longer in use.- Specified by:
- closein interface- AutoCloseable
- Specified by:
- closein interface- Closeable
- Specified by:
- closein interface- SolrQueryRequest
 
 - 
getContentStreamspublic Iterable<ContentStream> getContentStreams() A Collection of ContentStreams passed to the request- Specified by:
- getContentStreamsin interface- SolrQueryRequest
 
 - 
setContentStreamspublic void setContentStreams(Iterable<ContentStream> s) 
 - 
getParamStringpublic String getParamString() Description copied from interface:SolrQueryRequestReturns a string representing all the important parameters. Suitable for logging.- Specified by:
- getParamStringin interface- SolrQueryRequest
 
 - 
getJSONpublic Map<String,Object> getJSON() Description copied from interface:SolrQueryRequestReturns 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- Specified by:
- getJSONin interface- SolrQueryRequest
 
 - 
setJSONpublic void setJSON(Map<String,Object> json) - Specified by:
- setJSONin interface- SolrQueryRequest
 
 - 
getUserPrincipalpublic Principal getUserPrincipal() - Specified by:
- getUserPrincipalin interface- SolrQueryRequest
 
 - 
getCommandspublic List<CommandOperation> getCommands(boolean validateInput) Description copied from interface:SolrQueryRequestOnly for v2 API if the request contains a command payload, it's parsed and returned as a list of CommandOperation objects- Specified by:
- getCommandsin interface- SolrQueryRequest
- Parameters:
- validateInput- , If true it is validated against the json schema spec
 
 - 
getSpecprotected ValidatingJsonMap getSpec() 
 - 
getValidatorsprotected Map<String,JsonSchemaValidator> getValidators() 
 
- 
 
-