public class DocBuilder extends Object
DocBuilder
is responsible for creating Solr documents out of the given configuration. It also maintains
statistics information. It depends on the EntityProcessor
implementations to fetch data.
Modifier and Type | Class and Description |
---|---|
static class |
DocBuilder.Statistics |
Modifier and Type | Field and Description |
---|---|
DocBuilder.Statistics |
importStatistics |
static String |
INDEX_START_TIME |
static String |
LAST_INDEX_TIME |
static String |
TIME_ELAPSED |
Constructor and Description |
---|
DocBuilder(DataImporter dataImporter,
SolrWriter solrWriter,
DIHPropertiesWriter propWriter,
org.apache.solr.handler.dataimport.DataImporter.RequestParams reqParams) |
Modifier and Type | Method and Description |
---|---|
void |
abort() |
void |
addStatusMessage(String msg) |
Set<Map<String,Object>> |
collectDelta(DataConfig.Entity entity,
VariableResolverImpl resolver,
Set<Map<String,Object>> deletedRows)
Collects unique keys of all Solr documents for whom one or more source tables have been changed since the last
indexed time.
|
protected EntityProcessor |
createProcessor(DataConfig.Entity entity) |
void |
destroy() |
void |
execute() |
VariableResolverImpl |
getVariableResolver() |
public DocBuilder.Statistics importStatistics
public static final String TIME_ELAPSED
public static final String LAST_INDEX_TIME
public static final String INDEX_START_TIME
public DocBuilder(DataImporter dataImporter, SolrWriter solrWriter, DIHPropertiesWriter propWriter, org.apache.solr.handler.dataimport.DataImporter.RequestParams reqParams)
public VariableResolverImpl getVariableResolver()
public void execute()
public void addStatusMessage(String msg)
public Set<Map<String,Object>> collectDelta(DataConfig.Entity entity, VariableResolverImpl resolver, Set<Map<String,Object>> deletedRows)
Collects unique keys of all Solr documents for whom one or more source tables have been changed since the last indexed time.
Note: In our definition, unique key of Solr document is the primary key of the top level entity (unless skipped using docRoot=false) in the Solr document in data-config.xml
public void abort()
protected EntityProcessor createProcessor(DataConfig.Entity entity)
public void destroy()