DocBuilder (Solr 3.6.2 API)
Keywords: org.apache.solr.handler.dataimport.DocBuilder class

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.solr.handler.dataimport
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 the `EntityProcessor` implementations to fetch data.

This API is experimental and subject to change

Since:
  solr 1.3
Version:
  $Id: DocBuilder.java 1305930 2012-03-27 17:50:36Z hossman $

Nested Class Summary
`static class` | `DocBuilder.Statistics`

Field Summary
`DocBuilder.Statistics` | `importStatistics`
`static String` | `INDEX_START_TIME`
`static String` | `LAST_INDEX_TIME`
`static String` | `TIME_ELAPSED`

Constructor Summary
`DocBuilder(DataImporter dataImporter, SolrWriter solrWriter, DIHPropertiesWriter propWriter, org.apache.solr.handler.dataimport.DataImporter.RequestParams reqParams)`

Method Summary
`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()`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### 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,
                      SolrWriter solrWriter,
                      DIHPropertiesWriter propWriter,
                      org.apache.solr.handler.dataimport.DataImporter.RequestParams reqParams)

Method Detail

### getVariableResolver

    public VariableResolverImpl getVariableResolver()

### execute

    public void execute()

### addStatusMessage

    public void addStatusMessage(String msg)

### collectDelta

    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

  Returns:
    an iterator to the list of keys for which Solr documents should be updated.

### abort

    public void abort()

### createProcessor

    protected EntityProcessor createProcessor(DataConfig.Entity entity)

### destroy

    public void destroy()

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD