public class DocumentAndOp
extends java.lang.Object
implements org.apache.hadoop.io.Writable
Modifier and Type | Class and Description |
---|---|
static class |
DocumentAndOp.Op
This class represents the type of an operation - an insert, a delete or
an update.
|
Constructor and Description |
---|
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.
|
Modifier and Type | Method and Description |
---|---|
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(java.io.DataInput 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.
|
java.lang.String |
toString() |
void |
write(java.io.DataOutput out) |
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
- 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 java.lang.String toString()
toString
in class java.lang.Object
public void write(java.io.DataOutput out) throws java.io.IOException
write
in interface org.apache.hadoop.io.Writable
java.io.IOException
public void readFields(java.io.DataInput in) throws java.io.IOException
readFields
in interface org.apache.hadoop.io.Writable
java.io.IOException
Copyright © 2009 The Apache Software Foundation