org.apache.solr.handler.dataimport
Class SolrWriter
java.lang.Object
org.apache.solr.handler.dataimport.SolrWriter
public class SolrWriter
- extends Object
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.
- Since:
- solr 1.3
- Version:
- $Id: SolrWriter.java 1135956 2011-06-15 08:36:06Z shalin $
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
START_ENTITY
public static final int START_ENTITY
- See Also:
- Constant Field Values
END_ENTITY
public static final int END_ENTITY
- See Also:
- Constant Field Values
TRANSFORMED_ROW
public static final int TRANSFORMED_ROW
- See Also:
- Constant Field Values
ENTITY_META
public static final int ENTITY_META
- See Also:
- Constant Field Values
PRE_TRANSFORMER_ROW
public static final int PRE_TRANSFORMER_ROW
- See Also:
- Constant Field Values
START_DOC
public static final int START_DOC
- See Also:
- Constant Field Values
END_DOC
public static final int END_DOC
- See Also:
- Constant Field Values
ENTITY_OUT
public static final int ENTITY_OUT
- See Also:
- Constant Field Values
ROW_END
public static final int ROW_END
- See Also:
- Constant Field Values
TRANSFORMER_EXCEPTION
public static final int TRANSFORMER_EXCEPTION
- See Also:
- Constant Field Values
ENTITY_EXCEPTION
public static final int ENTITY_EXCEPTION
- See Also:
- Constant Field Values
DISABLE_LOGGING
public static final int DISABLE_LOGGING
- See Also:
- Constant Field Values
ENABLE_LOGGING
public static final int ENABLE_LOGGING
- See Also:
- Constant Field Values
SolrWriter
public SolrWriter(UpdateRequestProcessor processor,
String confDir)
SolrWriter
public SolrWriter(UpdateRequestProcessor processor,
String confDir,
String filePrefix)
upload
public boolean upload(SolrInputDocument d)
deleteDoc
public void deleteDoc(Object id)
deleteByQuery
public void deleteByQuery(String query)
commit
public void commit(boolean optimize)
rollback
public void rollback()
doDeleteAll
public void doDeleteAll()
getDebugLogger
public org.apache.solr.handler.dataimport.DebugLogger getDebugLogger()
log
public void log(int event,
String name,
Object row)
- This method is used for verbose debugging
- Parameters:
event
- The event name start.entity ,end.entity ,transformer.rowname
- Name of the entity/transformerrow
- The actual data . Can be a Map or a List
Copyright © 2000-2011 Apache Software Foundation. All Rights Reserved.