Methods Summary |
---|
public void | addField(org.apache.lucene.gdata.search.analysis.ContentStrategy field)Adds a new field e.g. ContentStrategy to the IndexDocument
if (field == null)
return;
this.fields.add(field);
|
public boolean | commitAfter()
return this.commitAfter;
|
public final boolean | equals(java.lang.Object obj)
if(obj == null)
return false;
if(this == obj)
return true;
if(obj instanceof GDataIndexDocument){
GDataIndexDocument other = (GDataIndexDocument)obj;
if(this.id == null)
return false;
return this.id.equals(other.id);
}
return false;
|
public org.apache.lucene.index.Term | getDeletealbe()
return new Term(IndexDocument.FIELD_ENTRY_ID, this.id);
|
public org.apache.lucene.document.Document | getWriteable()
Document retVal = new Document();
retVal.add(new Field(FIELD_ENTRY_ID, this.id, Field.Store.YES,
Field.Index.UN_TOKENIZED));
retVal.add(new Field(FIELD_FEED_ID, this.feedId, Field.Store.YES,
Field.Index.UN_TOKENIZED));
for (ContentStrategy strategy : this.fields) {
Field[] fieldArray = strategy.createLuceneField();
for (int i = 0; i < fieldArray.length; i++) {
retVal.add(fieldArray[i]);
}
}
return retVal;
|
public final int | hashCode()
if(this.id == null)
return super.hashCode();
return this.id.hashCode();
|
private boolean | isAction(IndexAction indexAction)
return this.action == indexAction;
|
public boolean | isDelete()
return isAction(IndexAction.DELETE);
|
public boolean | isInsert()
return isAction(IndexAction.INSERT);
|
public boolean | isUpdate()
return isAction(IndexAction.UPDATE);
|
public boolean | optimizeAfter()
return this.optimizeAfter;
|