|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.solr.handler.dataimport.SolrWriter
public abstract class SolrWriter
Writes documents to SOLR as well as provides methods for loading and persisting last index time.
This API is experimental and may change in the future.
Nested Class Summary | |
---|---|
static interface |
SolrWriter.SolrDoc
The purpose of this interface to provide pluggable implementations for Solr 1.2 & 1.3 The implementation can choose to wrap appropriate Objects based on the version |
Field Summary | |
---|---|
static int |
DISABLE_LOGGING
|
static int |
ENABLE_LOGGING
|
static int |
END_DOC
|
static int |
END_ENTITY
|
static int |
ENTITY_EXCEPTION
|
static int |
ENTITY_META
|
static int |
ENTITY_OUT
|
static int |
PRE_TRANSFORMER_ROW
|
static int |
ROW_END
|
static int |
START_DOC
|
static int |
START_ENTITY
|
static int |
TRANSFORMED_ROW
|
static int |
TRANSFORMER_EXCEPTION
|
Constructor Summary | |
---|---|
SolrWriter(org.apache.solr.update.processor.UpdateRequestProcessor processor,
String confDir)
|
Method Summary | |
---|---|
void |
commit(boolean optimize)
|
void |
deleteByQuery(String query)
|
void |
deleteDoc(Object id)
|
void |
doDeleteAll()
|
abstract SolrWriter.SolrDoc |
getSolrDocInstance()
|
Date |
loadIndexStartTime()
|
abstract void |
log(int event,
String name,
Object row)
This method is used for verbose debugging |
void |
persistIndexStartTime(Date date)
Stores the last indexed time into the IMPORTER_PROPERTIES
file. |
boolean |
upload(org.apache.solr.common.SolrInputDocument d)
|
abstract boolean |
upload(SolrWriter.SolrDoc d)
Write the document to the index |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int START_ENTITY
public static final int END_ENTITY
public static final int TRANSFORMED_ROW
public static final int ENTITY_META
public static final int PRE_TRANSFORMER_ROW
public static final int START_DOC
public static final int END_DOC
public static final int ENTITY_OUT
public static final int ROW_END
public static final int TRANSFORMER_EXCEPTION
public static final int ENTITY_EXCEPTION
public static final int DISABLE_LOGGING
public static final int ENABLE_LOGGING
Constructor Detail |
---|
public SolrWriter(org.apache.solr.update.processor.UpdateRequestProcessor processor, String confDir)
Method Detail |
---|
public boolean upload(org.apache.solr.common.SolrInputDocument d)
public void deleteDoc(Object id)
public void deleteByQuery(String query)
public void commit(boolean optimize)
public void doDeleteAll()
public Date loadIndexStartTime()
public void persistIndexStartTime(Date date)
Stores the last indexed time into the IMPORTER_PROPERTIES
file. If any properties are already defined in the file, then they are
preserved.
date
- the Date instance to be persistedpublic abstract SolrWriter.SolrDoc getSolrDocInstance()
public abstract boolean upload(SolrWriter.SolrDoc d)
Write the document to the index
d
- . The Document warapper object
public abstract void log(int event, String name, Object row)
event
- The event name start.entity ,end.entity ,transformer.rowname
- Name of the entity/transformerrow
- The actual data . Can be a Map
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |