You will just know a "Knuth" algo "by hand", until you execute it manually.
Now will "born" by "pure evil".
"The first customer of a Open Source software, is the author".
package org.nanotek.lucene;
import java.util.Date;
import org.apache.lucene.document.Field;
import org.apache.lucene.document.TextField;
import org.apache.lucene.document.LongField;
import org.apache.lucene.document.Document;
private String textFieldName = "TextData";
@Override
public Document buildDocument(String source) {
Document document = new Document();
Field wordField = new TextField(textFieldName, source, Field.Store.YES);
document.add(wordField);
Field modifiedField = new LongField("modified" , new Date().getTime() , Field.Store.YES);
document.add(modifiedField);
return document;
}
public String getTextFieldName() {
return textFieldName;
}
public void setTextFieldName(String textFieldName) {
this.textFieldName = textFieldName;
}
}