public class RealTimeGetComponent extends SearchComponent
Modifier and Type | Class and Description |
---|---|
static class |
RealTimeGetComponent.Resolution
Lookup strategy for some methods on this class.
|
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,
BytesRef rootIdBytes,
AtomicLong versionReturned,
Set<String> onlyTheseFields,
RealTimeGetComponent.Resolution resolveStrategy)
Obtains the latest document for a given id from the tlog or through the realtime searcher (if not found in the tlog).
|
static SolrInputDocument |
getInputDocument(SolrCore core,
BytesRef idBytes,
RealTimeGetComponent.Resolution lookupStrategy)
Deprecated.
|
static SolrInputDocument |
getInputDocumentFromTlog(SolrCore core,
BytesRef idBytes,
AtomicLong versionReturned,
Set<String> onlyTheseNonStoredDVs,
boolean resolveFullDocument)
Deprecated.
|
static SolrInputDocument |
getInputDocumentFromTlog(SolrCore core,
BytesRef idBytes,
AtomicLong versionReturned,
Set<String> onlyTheseFields,
RealTimeGetComponent.Resolution resolution)
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) |
void |
processSyncWithLeader(ResponseBuilder rb,
int nVersions,
String syncWithLeader,
List<Long> versions) |
static SolrDocument |
toSolrDoc(SolrInputDocument sdoc,
IndexSchema schema)
Converts a SolrInputDocument to SolrDocument, using an IndexSchema instance.
|
static SolrDocument |
toSolrDoc(SolrInputDocument sdoc,
IndexSchema schema,
boolean forInPlaceUpdate)
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.@Deprecated public static SolrInputDocument getInputDocumentFromTlog(SolrCore core, BytesRef idBytes, AtomicLong versionReturned, Set<String> onlyTheseNonStoredDVs, boolean resolveFullDocument)
public static SolrInputDocument getInputDocumentFromTlog(SolrCore core, BytesRef idBytes, AtomicLong versionReturned, Set<String> onlyTheseFields, RealTimeGetComponent.Resolution resolution)
idBytes
- doc ID to find; never a child doc.versionReturned
- If a non-null AtomicLong is passed in, it is set to the version of the update returned from the TLog.@Deprecated public static SolrInputDocument getInputDocument(SolrCore core, BytesRef idBytes, RealTimeGetComponent.Resolution lookupStrategy) throws IOException
IOException
public static SolrInputDocument getInputDocument(SolrCore core, BytesRef idBytes, BytesRef rootIdBytes, AtomicLong versionReturned, Set<String> onlyTheseFields, RealTimeGetComponent.Resolution resolveStrategy) throws IOException
idBytes
- ID of the document to be fetched.rootIdBytes
- the root ID of the document being looked up.
If there are no child docs, this is always the same as idBytes.versionReturned
- If a non-null AtomicLong is passed in, it is set to the version of the update returned from the TLog.onlyTheseFields
- If not-null, this limits the fields that are returned. However it is only an optimization
hint since other fields may be returned. Copy field targets are never returned.resolveStrategy
- RealTimeGetComponent.Resolution.DOC
or RealTimeGetComponent.Resolution.ROOT_WITH_CHILDREN
.IOException
RealTimeGetComponent.Resolution
public static SolrDocument toSolrDoc(SolrInputDocument sdoc, IndexSchema schema)
public static SolrDocument toSolrDoc(SolrInputDocument sdoc, IndexSchema schema, boolean forInPlaceUpdate)
sdoc
- The input document.schema
- The index schema.forInPlaceUpdate
- Whether the document is being used for an in place update,
see DocumentBuilder.toDocument(SolrInputDocument, IndexSchema, boolean, boolean)
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 processSyncWithLeader(ResponseBuilder rb, int nVersions, String syncWithLeader, List<Long> versions)
public void processSync(ResponseBuilder rb, int nVersions, String sync)
public void processGetUpdates(ResponseBuilder rb) throws IOException
IOException
Copyright © 2000-2021 Apache Software Foundation. All Rights Reserved.