org.apache.nutch.indexer.lucene
Class LuceneWriter
java.lang.Object
org.apache.nutch.indexer.lucene.LuceneWriter
- All Implemented Interfaces:
- NutchIndexWriter
public class LuceneWriter
- extends Object
- implements NutchIndexWriter
Method Summary |
static void |
add(NutchDocument doc,
Field f)
Deprecated. Use NutchDocument.add(String, String) instead and
set index-level metadata for field information. |
static void |
addFieldOptions(String field,
LuceneWriter.STORE store,
LuceneWriter.INDEX index,
Configuration conf)
|
static void |
addFieldOptions(String field,
LuceneWriter.STORE store,
LuceneWriter.INDEX index,
LuceneWriter.VECTOR vector,
Configuration conf)
|
void |
close()
|
void |
open(JobConf job,
String name)
|
void |
write(NutchDocument doc)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
LuceneWriter
public LuceneWriter()
open
public void open(JobConf job,
String name)
throws IOException
- Specified by:
open
in interface NutchIndexWriter
- Throws:
IOException
close
public void close()
throws IOException
- Specified by:
close
in interface NutchIndexWriter
- Throws:
IOException
write
public void write(NutchDocument doc)
throws IOException
- Specified by:
write
in interface NutchIndexWriter
- Throws:
IOException
add
@Deprecated
public static void add(NutchDocument doc,
Field f)
- Deprecated. Use
NutchDocument.add(String, String)
instead and
set index-level metadata for field information.
- Adds a lucene field.
This method is provided for backward-compatibility with
older indexing filters. This should not be used by newer
implementations since this is slower than
NutchDocument.add(String, String)
and will be removed
in a future release.
- Parameters:
f
- Lucene field to be added.
addFieldOptions
public static void addFieldOptions(String field,
LuceneWriter.STORE store,
LuceneWriter.INDEX index,
LuceneWriter.VECTOR vector,
Configuration conf)
addFieldOptions
public static void addFieldOptions(String field,
LuceneWriter.STORE store,
LuceneWriter.INDEX index,
Configuration conf)
Copyright © 2006 The Apache Software Foundation