org.apache.nutch.indexer
Class NutchDocument
java.lang.Object
org.apache.nutch.indexer.NutchDocument
- All Implemented Interfaces:
- Iterable<Map.Entry<String,List<String>>>, Writable
public class NutchDocument
- extends Object
- implements Writable, Iterable<Map.Entry<String,List<String>>>
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,
String value)
getFieldValue
public String getFieldValue(String name)
getFieldValues
public List<String> getFieldValues(String name)
removeField
public List<String> removeField(String name)
getFieldNames
public Collection<String> getFieldNames()
iterator
public Iterator<Map.Entry<String,List<String>>> iterator()
- Iterate over all fields.
- Specified by:
iterator
in interface Iterable<Map.Entry<String,List<String>>>
getScore
public float getScore()
setScore
public void setScore(float score)
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 © 2012 The Apache Software Foundation