Class PlainTextEntityProcessor
- java.lang.Object
-
- org.apache.solr.handler.dataimport.EntityProcessor
-
- org.apache.solr.handler.dataimport.EntityProcessorBase
-
- org.apache.solr.handler.dataimport.PlainTextEntityProcessor
-
public class PlainTextEntityProcessor extends EntityProcessorBase
An implementation of
EntityProcessor
which reads data from a url/file and give out a row which contains one String value. The name of the field is 'plainText'.- Since:
- solr 1.4
-
-
Field Summary
Fields Modifier and Type Field Description static String
PLAIN_TEXT
-
Fields inherited from class org.apache.solr.handler.dataimport.EntityProcessorBase
ABORT, cacheSupport, context, CONTINUE, entityName, isFirstInit, ON_ERROR, onError, query, rowIterator, SKIP, TRANSFORM_ROW, TRANSFORMER
-
-
Constructor Summary
Constructors Constructor Description PlainTextEntityProcessor()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
init(Context context)
This method is called when it starts processing an entity.Map<String,Object>
nextRow()
For a simple implementation, this is the only method that the sub-class should implement.-
Methods inherited from class org.apache.solr.handler.dataimport.EntityProcessorBase
destroy, firstInit, getNext, initCache, nextDeletedRowKey, nextModifiedParentRowKey, nextModifiedRowKey
-
Methods inherited from class org.apache.solr.handler.dataimport.EntityProcessor
close, postTransform
-
-
-
-
Field Detail
-
PLAIN_TEXT
public static final String PLAIN_TEXT
- See Also:
- Constant Field Values
-
-
Method Detail
-
init
public void init(Context context)
Description copied from class:EntityProcessor
This method is called when it starts processing an entity. When it comes back to the entity it is called again. So it can reset anything at that point. For a rootmost entity this is called only once for an ingestion. For sub-entities , this is called multiple once for each row from its parent entity- Overrides:
init
in classEntityProcessorBase
- Parameters:
context
- The current context
-
nextRow
public Map<String,Object> nextRow()
Description copied from class:EntityProcessorBase
For a simple implementation, this is the only method that the sub-class should implement. This is intended to stream rows one-by-one. Return null to signal end of rows- Overrides:
nextRow
in classEntityProcessorBase
- Returns:
- a row where the key is the name of the field and value can be any Object or a Collection of objects. Return null to signal end of rows
-
-