public class NutchDocument extends Object implements org.apache.hadoop.io.Writable, Iterable<Map.Entry<String,NutchField>>
NutchDocument is the unit of indexing.| Modifier and Type | Field and Description |
|---|---|
static byte |
VERSION |
| Constructor and Description |
|---|
NutchDocument() |
| Modifier and Type | Method and Description |
|---|---|
void |
add(String name,
Object value) |
Metadata |
getDocumentMeta() |
NutchField |
getField(String name) |
Collection<String> |
getFieldNames() |
Object |
getFieldValue(String name) |
float |
getWeight() |
Iterator<Map.Entry<String,NutchField>> |
iterator()
Iterate over all fields.
|
void |
readFields(DataInput in) |
NutchField |
removeField(String name) |
void |
setWeight(float weight) |
String |
toString() |
void |
write(DataOutput out) |
public static final byte VERSION
public NutchField getField(String name)
public NutchField removeField(String name)
public Collection<String> getFieldNames()
public Iterator<Map.Entry<String,NutchField>> iterator()
iterator in interface Iterable<Map.Entry<String,NutchField>>public float getWeight()
public void setWeight(float weight)
public Metadata getDocumentMeta()
public void readFields(DataInput in) throws IOException
readFields in interface org.apache.hadoop.io.WritableIOExceptionpublic void write(DataOutput out) throws IOException
write in interface org.apache.hadoop.io.WritableIOExceptionCopyright © 2014 The Apache Software Foundation