public class CSVIndexWriter extends Object implements IndexWriter
describe().
Note: works only in local mode, to be used with index option
-noCommit.
| Modifier and Type | Class and Description |
|---|---|
protected class |
CSVIndexWriter.Separator
represent separators (also quote and escape characters) as char(s) and
byte(s) in the output encoding for efficiency.
|
| Modifier and Type | Field and Description |
|---|---|
protected FSDataOutputStream |
csvout |
protected Charset |
encoding
encoding of CSV file
|
static org.slf4j.Logger |
LOG |
X_POINT_ID| Constructor and Description |
|---|
CSVIndexWriter() |
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
void |
commit()
(nothing to commit)
|
void |
delete(String key)
(deletion of documents is not supported)
|
Map<String,Map.Entry<String,Object>> |
describe()
Returns
Map with the specific parameters the IndexWriter instance can take. |
Configuration |
getConf() |
static void |
main(String[] args) |
void |
open(Configuration conf,
String name) |
void |
open(IndexWriterParams parameters)
Initializes the internal variables from a given index writer configuration.
|
void |
setConf(Configuration conf) |
void |
update(NutchDocument doc) |
void |
write(NutchDocument doc) |
public static final org.slf4j.Logger LOG
protected Charset encoding
protected FSDataOutputStream csvout
public void open(Configuration conf, String name) throws IOException
open in interface IndexWriterIOExceptionpublic void open(IndexWriterParams parameters) throws IOException
open in interface IndexWriterparameters - Params from the index writer configuration.IOException - Some exception thrown by writer.public void write(NutchDocument doc) throws IOException
write in interface IndexWriterIOExceptionpublic void delete(String key)
delete in interface IndexWriterpublic void update(NutchDocument doc) throws IOException
update in interface IndexWriterIOExceptionpublic void close()
throws IOException
close in interface IndexWriterIOExceptionpublic void commit()
commit in interface IndexWriterpublic Configuration getConf()
getConf in interface Configurablepublic Map<String,Map.Entry<String,Object>> describe()
Map with the specific parameters the IndexWriter instance can take.describe in interface IndexWriterpublic void setConf(Configuration conf)
setConf in interface ConfigurableCopyright © 2021 The Apache Software Foundation