Package org.apache.nutch.indexer
Class NutchDocument
java.lang.Object
org.apache.nutch.indexer.NutchDocument
public class NutchDocument
extends Object
implements Writable, Iterable<Map.Entry<String,NutchField>>, Cloneable
A
NutchDocument is the unit of indexing.-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidclone()getFieldValue(String name) floatiterator()Iterate over all fields.voidreadFields(DataInput in) removeField(String name) voidsetWeight(float weight) toString()voidwrite(DataOutput out) Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface java.lang.Iterable
forEach, spliterator
-
Field Details
-
VERSION
public static final byte VERSION- See Also:
-
-
Constructor Details
-
NutchDocument
public NutchDocument()
-
-
Method Details
-
add
-
getFieldValue
-
getField
-
removeField
-
getFieldNames
-
iterator
Iterate over all fields.- Specified by:
iteratorin interfaceIterable<Map.Entry<String,NutchField>>
-
getWeight
public float getWeight() -
setWeight
public void setWeight(float weight) -
getDocumentMeta
-
readFields
- Specified by:
readFieldsin interfaceWritable- Throws:
IOException
-
write
- Specified by:
writein interfaceWritable- Throws:
IOException
-
toString
-
clone
- Overrides:
clonein classObject- Throws:
CloneNotSupportedException
-