public class RealTimeGetComponent extends SearchComponent
SolrInfoBean.Category, SolrInfoBean.Group
Modifier and Type | Field and Description |
---|---|
static String |
COMPONENT_NAME |
static SolrInputDocument |
DELETED |
metricNames, registry, standard_components
Constructor and Description |
---|
RealTimeGetComponent() |
Modifier and Type | Method and Description |
---|---|
int |
createSubRequests(ResponseBuilder rb) |
int |
distributedProcess(ResponseBuilder rb)
Process for a distributed search.
|
void |
finishStage(ResponseBuilder rb)
private void handleRegularResponses(ResponseBuilder rb, ShardRequest sreq) {
}
|
SolrInfoBean.Category |
getCategory()
Category of this component
|
String |
getDescription()
Simple one or two line description
|
static SolrInputDocument |
getInputDocument(SolrCore core,
BytesRef idBytes)
Obtains the latest document for a given id from the tlog or index (if not found in the tlog).
|
static SolrInputDocument |
getInputDocument(SolrCore core,
BytesRef idBytes,
AtomicLong versionReturned,
boolean avoidRetrievingStoredFields,
Set<String> onlyTheseNonStoredDVs,
boolean resolveFullDocument)
Obtains the latest document for a given id from the tlog or through the realtime searcher (if not found in the tlog).
|
static SolrInputDocument |
getInputDocumentFromTlog(SolrCore core,
BytesRef idBytes,
AtomicLong versionReturned,
Set<String> onlyTheseNonStoredDVs,
boolean resolveFullDocument)
returns the SolrInputDocument from the current tlog, or DELETED if it has been deleted, or
null if there is no record of it in the current update log.
|
void |
prepare(ResponseBuilder rb)
Prepare the response.
|
void |
process(ResponseBuilder rb)
Process the request for this component
|
void |
processGetFingeprint(ResponseBuilder rb) |
void |
processGetUpdates(ResponseBuilder rb) |
void |
processGetVersions(ResponseBuilder rb) |
void |
processSync(ResponseBuilder rb,
int nVersions,
String sync) |
static SolrDocument |
toSolrDoc(SolrInputDocument sdoc,
IndexSchema schema)
Converts a SolrInputDocument to SolrDocument, using an IndexSchema instance.
|
getMetricNames, getMetricRegistry, getName, handleResponses, init, modifyRequest, setName
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getMetricsSnapshot, registerMetricName
public static final String COMPONENT_NAME
public static SolrInputDocument DELETED
public void prepare(ResponseBuilder rb) throws IOException
SearchComponent
SearchComponent.process(org.apache.solr.handler.component.ResponseBuilder)
method.
Called for every incoming request.
The place to do initialization that is request dependent.prepare
in class SearchComponent
rb
- The ResponseBuilder
IOException
- If there is a low-level I/O error.public void process(ResponseBuilder rb) throws IOException
SearchComponent
process
in class SearchComponent
rb
- The ResponseBuilder
IOException
- If there is a low-level I/O error.public static SolrInputDocument getInputDocumentFromTlog(SolrCore core, BytesRef idBytes, AtomicLong versionReturned, Set<String> onlyTheseNonStoredDVs, boolean resolveFullDocument)
versionReturned
- If a non-null AtomicLong is passed in, it is set to the version of the update returned from the TLog.resolveFullDocument
- In case the document is fetched from the tlog, it could only be a partial document if the last update
was an in-place update. In that case, should this partial document be resolved to a full document (by following
back prevPointer/prevVersion)?public static SolrInputDocument getInputDocument(SolrCore core, BytesRef idBytes) throws IOException
getInputDocument(SolrCore, BytesRef, AtomicLong, boolean, Set, boolean)
,
so as to retrieve all stored and non-stored DV fields from all documents. Also, it uses the effective value of
resolveFullDocument param as true, i.e. it resolves any partial documents (in-place updates), in case the
document is fetched from the tlog, to a full document.IOException
public static SolrInputDocument getInputDocument(SolrCore core, BytesRef idBytes, AtomicLong versionReturned, boolean avoidRetrievingStoredFields, Set<String> onlyTheseNonStoredDVs, boolean resolveFullDocument) throws IOException
versionReturned
- If a non-null AtomicLong is passed in, it is set to the version of the update returned from the TLog.avoidRetrievingStoredFields
- Setting this to true avoids fetching stored fields through the realtime searcher,
however has no effect on documents obtained from the tlog.
Non-stored docValues fields are populated anyway, and are not affected by this parameter. Note that if
the id field is a stored field, it will not be populated if this parameter is true and the document is
obtained from the index.onlyTheseNonStoredDVs
- If not-null, populate only these DV fields in the document fetched through the realtime searcher.
If this is null, decorate all non-stored DVs (that are not targets of copy fields) from the searcher.resolveFullDocument
- In case the document is fetched from the tlog, it could only be a partial document if the last update
was an in-place update. In that case, should this partial document be resolved to a full document (by following
back prevPointer/prevVersion)?IOException
public static SolrDocument toSolrDoc(SolrInputDocument sdoc, IndexSchema schema)
public int distributedProcess(ResponseBuilder rb) throws IOException
SearchComponent
distributedProcess
in class SearchComponent
IOException
public int createSubRequests(ResponseBuilder rb) throws IOException
IOException
public void finishStage(ResponseBuilder rb)
finishStage
in class SearchComponent
public String getDescription()
SolrInfoBean
getDescription
in interface SolrInfoBean
getDescription
in class SearchComponent
public SolrInfoBean.Category getCategory()
SolrInfoBean
getCategory
in interface SolrInfoBean
getCategory
in class SearchComponent
public void processGetFingeprint(ResponseBuilder rb) throws IOException
IOException
public void processGetVersions(ResponseBuilder rb) throws IOException
IOException
public void processSync(ResponseBuilder rb, int nVersions, String sync)
public void processGetUpdates(ResponseBuilder rb) throws IOException
IOException
Copyright © 2000-2017 Apache Software Foundation. All Rights Reserved.