org.apache.nutch.indexer
Class NutchDocument
java.lang.Object
org.apache.nutch.indexer.NutchDocument
- All Implemented Interfaces:
- Iterable<Map.Entry<String,NutchField>>, Writable
public class NutchDocument
- extends Object
- implements Writable, Iterable<Map.Entry<String,NutchField>>
A NutchDocument
is the unit of indexing.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
VERSION
public static final byte VERSION
- See Also:
- Constant Field Values
NutchDocument
public NutchDocument()
add
public void add(String name,
Object value)
getFieldValue
public Object getFieldValue(String name)
getField
public NutchField getField(String name)
removeField
public NutchField removeField(String name)
getFieldNames
public Collection<String> getFieldNames()
iterator
public Iterator<Map.Entry<String,NutchField>> iterator()
- Iterate over all fields.
- Specified by:
iterator
in interface Iterable<Map.Entry<String,NutchField>>
getWeight
public float getWeight()
setWeight
public void setWeight(float weight)
getDocumentMeta
public Metadata getDocumentMeta()
readFields
public void readFields(DataInput in)
throws IOException
- Specified by:
readFields
in interface Writable
- Throws:
IOException
write
public void write(DataOutput out)
throws IOException
- Specified by:
write
in interface Writable
- Throws:
IOException
Copyright © 2006 The Apache Software Foundation