public abstract class SolrQueryRequestBase extends Object implements SolrQueryRequest, Closeable
SolrQueryRequest that 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.
| Modifier and Type | Field and Description |
|---|---|
protected Map<Object,Object> |
context |
protected SolrCore |
core |
protected Map<String,Object> |
json |
protected SolrParams |
origParams |
protected SolrParams |
params |
protected IndexSchema |
schema |
protected RefCounted<SolrIndexSearcher> |
searcherHolder |
protected long |
startTime |
protected Iterable<ContentStream> |
streams |
| Constructor and Description |
|---|
SolrQueryRequestBase(SolrCore core,
SolrParams params) |
SolrQueryRequestBase(SolrCore core,
SolrParams params,
RTimerTree requestTimer) |
| Modifier and Type | Method and Description |
|---|---|
void |
close()
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 objects
|
Iterable<ContentStream> |
getContentStreams()
A Collection of ContentStreams passed to the request
|
Map<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 request
|
Map<String,Object> |
getJSON()
Returns any associated JSON (or null if none) in deserialized generic form.
|
SolrParams |
getOriginalParams()
Returns the original request parameters.
|
SolrParams |
getParams()
returns the current request parameters
|
String |
getParamString()
Returns a string representing all the important parameters.
|
RTimerTree |
getRequestTimer()
The timer for this request, created when the request started being processed
|
IndexSchema |
getSchema()
The schema snapshot from core.getLatestSchema() at request creation.
|
SolrIndexSearcher |
getSearcher()
The index searcher associated with this request
|
protected ValidatingJsonMap |
getSpec() |
long |
getStartTime()
The start time of this request in milliseconds.
|
Principal |
getUserPrincipal() |
protected Map<String,JsonSchemaValidator> |
getValidators() |
void |
setContentStreams(Iterable<ContentStream> s) |
void |
setJSON(Map<String,Object> json) |
void |
setParams(SolrParams params)
Change the parameters for this request.
|
String |
toString() |
void |
updateSchemaToLatest()
Replaces the current schema snapshot with the latest from the core.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitgetHttpMethod, getHttpSolrCall, getPath, getPathTemplateValuesprotected final SolrCore core
protected final SolrParams origParams
protected volatile IndexSchema schema
protected SolrParams params
protected Iterable<ContentStream> streams
protected final long startTime
protected RefCounted<SolrIndexSearcher> searcherHolder
public SolrQueryRequestBase(SolrCore core, SolrParams params, RTimerTree requestTimer)
public SolrQueryRequestBase(SolrCore core, SolrParams params)
public Map<Object,Object> getContext()
SolrQueryRequestgetContext in interface SolrQueryRequestpublic SolrParams getParams()
SolrQueryRequestgetParams in interface SolrQueryRequestpublic SolrParams getOriginalParams()
SolrQueryRequestgetOriginalParams in interface SolrQueryRequestpublic void setParams(SolrParams params)
SolrQueryRequestsetParams in interface SolrQueryRequestpublic long getStartTime()
SolrQueryRequestgetStartTime in interface SolrQueryRequestpublic RTimerTree getRequestTimer()
SolrQueryRequestgetRequestTimer in interface SolrQueryRequestpublic SolrIndexSearcher getSearcher()
SolrQueryRequestgetSearcher in interface SolrQueryRequestpublic SolrCore getCore()
SolrQueryRequestgetCore in interface SolrQueryRequestpublic IndexSchema getSchema()
SolrQueryRequestgetSchema in interface SolrQueryRequestpublic void updateSchemaToLatest()
SolrQueryRequestupdateSchemaToLatest in interface SolrQueryRequestpublic void close()
close in interface Closeableclose in interface AutoCloseableclose in interface SolrQueryRequestpublic Iterable<ContentStream> getContentStreams()
getContentStreams in interface SolrQueryRequestpublic void setContentStreams(Iterable<ContentStream> s)
public String getParamString()
SolrQueryRequestgetParamString in interface SolrQueryRequestpublic Map<String,Object> getJSON()
SolrQueryRequestgetJSON in interface SolrQueryRequestpublic void setJSON(Map<String,Object> json)
setJSON in interface SolrQueryRequestpublic Principal getUserPrincipal()
getUserPrincipal in interface SolrQueryRequestpublic List<CommandOperation> getCommands(boolean validateInput)
SolrQueryRequestgetCommands in interface SolrQueryRequestvalidateInput - , If true it is validated against the json schema specprotected ValidatingJsonMap getSpec()
protected Map<String,JsonSchemaValidator> getValidators()
Copyright © 2000-2021 Apache Software Foundation. All Rights Reserved.