Class DocBuilder
- java.lang.Object
-
- org.apache.solr.handler.dataimport.DocBuilder
-
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 theEntityProcessor
implementations to fetch data.This API is experimental and subject to change
- Since:
- solr 1.3
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
DocBuilder.Statistics
-
Field Summary
Fields Modifier and Type Field Description static String
DELETE_DOC_BY_ID
static String
DELETE_DOC_BY_QUERY
static String
DOC_BOOST
DocBuilder.Statistics
importStatistics
static String
INDEX_START_TIME
static String
LAST_INDEX_TIME
static String
SKIP_DOC
static String
SKIP_ROW
static String
TIME_ELAPSED
-
Constructor Summary
Constructors Constructor Description DocBuilder(DataImporter dataImporter, DIHWriter solrWriter, DIHProperties propWriter, RequestInfo reqParams)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
abort()
void
addStatusMessage(String msg)
Set<Map<String,Object>>
collectDelta(EntityProcessorWrapper epw, VariableResolver 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.void
execute()
EntityProcessorWrapper
getEntityProcessorWrapper(Entity entity)
RequestInfo
getReqParams()
-
-
-
Field Detail
-
DELETE_DOC_BY_ID
public static final String DELETE_DOC_BY_ID
- See Also:
- Constant Field Values
-
DELETE_DOC_BY_QUERY
public static final String DELETE_DOC_BY_QUERY
- See Also:
- Constant Field Values
-
DOC_BOOST
public static final String DOC_BOOST
- See Also:
- Constant Field Values
-
SKIP_DOC
public static final String SKIP_DOC
- See Also:
- Constant Field Values
-
SKIP_ROW
public static final String SKIP_ROW
- See Also:
- Constant Field Values
-
importStatistics
public DocBuilder.Statistics importStatistics
-
TIME_ELAPSED
public static final String TIME_ELAPSED
- See Also:
- Constant Field Values
-
LAST_INDEX_TIME
public static final String LAST_INDEX_TIME
- See Also:
- Constant Field Values
-
INDEX_START_TIME
public static final String INDEX_START_TIME
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
DocBuilder
public DocBuilder(DataImporter dataImporter, DIHWriter solrWriter, DIHProperties propWriter, RequestInfo reqParams)
-
-
Method Detail
-
execute
public void execute()
-
addStatusMessage
public void addStatusMessage(String msg)
-
getEntityProcessorWrapper
public EntityProcessorWrapper getEntityProcessorWrapper(Entity entity)
-
collectDelta
public Set<Map<String,Object>> collectDelta(EntityProcessorWrapper epw, VariableResolver 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
- Returns:
- an iterator to the list of keys for which Solr documents should be updated.
-
abort
public void abort()
-
getReqParams
public RequestInfo getReqParams()
-
-