Package org.apache.nutch.indexer
Class IndexWriters
- java.lang.Object
-
- org.apache.nutch.indexer.IndexWriters
-
public class IndexWriters extends Object
Creates and cachesIndexWriterimplementing plugins.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description classIndexWriters.IndexWriterWrapper
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()voidcommit()voiddelete(String key)Stringdescribe()Lists the active IndexWriters and their configuration.static IndexWritersget(Configuration conf)voidopen(Configuration conf, String name)Initializes the internal variables of index writers.voidupdate(NutchDocument doc)voidwrite(NutchDocument doc)
-
-
-
Method Detail
-
get
public static IndexWriters get(Configuration conf)
-
open
public void open(Configuration conf, String name) throws IOException
Initializes the internal variables of index writers.- Parameters:
conf- Nutch configurationname- target name of theIndexWriterto be opened- Throws:
IOException- Some exception thrown by some writer.
-
write
public void write(NutchDocument doc) throws IOException
- Throws:
IOException
-
update
public void update(NutchDocument doc) throws IOException
- Throws:
IOException
-
delete
public void delete(String key) throws IOException
- Throws:
IOException
-
close
public void close() throws IOException- Throws:
IOException
-
commit
public void commit() throws IOException- Throws:
IOException
-
describe
public String describe()
Lists the active IndexWriters and their configuration.- Returns:
- The full description.
-
-