|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.solr.handler.dataimport.EntityProcessor org.apache.solr.handler.dataimport.EntityProcessorBase org.apache.solr.handler.dataimport.LineEntityProcessor
public class LineEntityProcessor
An EntityProcessor
instance which can stream lines of text read from a
datasource. Options allow lines to be explicitly skipped or included in the index.
Attribute summary
Although envisioned for reading lines from a file or url, LineEntityProcessor may also be useful for dealing with change lists, where each line contains filenames which can be used by subsequent entities to parse content from those files.
Refer to http://wiki.apache.org/solr/DataImportHandler for more details.
This API is experimental and may change in the future.
Pattern
Field Summary | |
---|---|
static String |
ACCEPT_LINE_REGEX
Holds the name of entity attribute that will be parsed to obtain the pattern to be used when checking to see if a line should be returned. |
static String |
SKIP_LINE_REGEX
Holds the name of entity attribute that will be parsed to obtain the pattern to be used when checking to see if a line should be ignored. |
static String |
URL
Holds the name of entity attribute that will be parsed to obtain the filename containing the changelist. |
Fields inherited from class org.apache.solr.handler.dataimport.EntityProcessorBase |
---|
ABORT, cacheSupport, context, CONTINUE, entityName, isFirstInit, ON_ERROR, onError, query, rowIterator, SKIP, SKIP_DOC, TRANSFORM_ROW, TRANSFORMER |
Constructor Summary | |
---|---|
LineEntityProcessor()
|
Method Summary | |
---|---|
void |
destroy()
Invoked for each parent-row after the last row for this entity is processed. |
void |
init(Context context)
Parses each of the entity attributes. |
Map<String,Object> |
nextRow()
Reads lines from the url till it finds a lines that matches the optional acceptLineRegex and does not match the optional skipLineRegex. |
Methods inherited from class org.apache.solr.handler.dataimport.EntityProcessorBase |
---|
firstInit, getNext, initCache, nextDeletedRowKey, nextModifiedParentRowKey, nextModifiedRowKey |
Methods inherited from class org.apache.solr.handler.dataimport.EntityProcessor |
---|
close, postTransform |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final String URL
public static final String ACCEPT_LINE_REGEX
public static final String SKIP_LINE_REGEX
Constructor Detail |
---|
public LineEntityProcessor()
Method Detail |
---|
public void init(Context context)
init
in class EntityProcessorBase
context
- The current contextpublic Map<String,Object> nextRow()
nextRow
in class EntityProcessorBase
public void destroy()
EntityProcessor
destroy
in class EntityProcessorBase
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |