|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.hadoop.contrib.index.mapred.DocumentAndOp
public class DocumentAndOp
This class represents an indexing operation. The operation can be an insert, a delete or an update. If the operation is an insert or an update, a (new) document must be specified. If the operation is a delete or an update, a delete term must be specified.
| Nested Class Summary | |
|---|---|
static class |
DocumentAndOp.Op
This class represents the type of an operation - an insert, a delete or an update. |
| Constructor Summary | |
|---|---|
DocumentAndOp()
Constructor for no operation. |
|
DocumentAndOp(DocumentAndOp.Op op,
org.apache.lucene.document.Document doc)
Constructor for an insert operation. |
|
DocumentAndOp(DocumentAndOp.Op op,
org.apache.lucene.document.Document doc,
org.apache.lucene.index.Term term)
Constructor for an insert, a delete or an update operation. |
|
DocumentAndOp(DocumentAndOp.Op op,
org.apache.lucene.index.Term term)
Constructor for a delete operation. |
|
| Method Summary | |
|---|---|
org.apache.lucene.document.Document |
getDocument()
Get the document. |
DocumentAndOp.Op |
getOp()
Get the type of operation. |
org.apache.lucene.index.Term |
getTerm()
Get the term. |
void |
readFields(DataInput in)
Deserialize the fields of this object from in. |
void |
setDelete(org.apache.lucene.index.Term term)
Set the instance to be a delete operation. |
void |
setInsert(org.apache.lucene.document.Document doc)
Set the instance to be an insert operation. |
void |
setUpdate(org.apache.lucene.document.Document doc,
org.apache.lucene.index.Term term)
Set the instance to be an update operation. |
String |
toString()
|
void |
write(DataOutput out)
Serialize the fields of this object to out. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public DocumentAndOp()
public DocumentAndOp(DocumentAndOp.Op op,
org.apache.lucene.document.Document doc)
op - doc -
public DocumentAndOp(DocumentAndOp.Op op,
org.apache.lucene.index.Term term)
op - term -
public DocumentAndOp(DocumentAndOp.Op op,
org.apache.lucene.document.Document doc,
org.apache.lucene.index.Term term)
op - doc - term - | Method Detail |
|---|
public void setInsert(org.apache.lucene.document.Document doc)
doc - public void setDelete(org.apache.lucene.index.Term term)
term -
public void setUpdate(org.apache.lucene.document.Document doc,
org.apache.lucene.index.Term term)
doc - term - public DocumentAndOp.Op getOp()
public org.apache.lucene.document.Document getDocument()
public org.apache.lucene.index.Term getTerm()
public String toString()
toString in class Object
public void write(DataOutput out)
throws IOException
Writableout.
write in interface Writableout - DataOuput to serialize this object into.
IOException
public void readFields(DataInput in)
throws IOException
Writablein.
For efficiency, implementations should attempt to re-use storage in the existing object where possible.
readFields in interface Writablein - DataInput to deseriablize this object from.
IOException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||