setTextType(cdoc.classifyTextContents(this)); }
//*-- create the Lucene Index
public void loadIndex(IndexWriter ramIW, boolean storeTermVector) throws IOException
{
Document doc = new Document();
doc.add( new Field("key", getFileName(), Field.Store.YES, Field.Index.NO) );
doc.add(new Field("contents", getContents().toString(), Field.Store.NO, Field.Index.TOKENIZED) );
doc.add( new Field("type", getFileType(), Field.Store.YES, Field.Index.NO) );
doc.add( new Field("category", getTextType(), Field.Store.YES, Field.Index.NO) );
ramIW.addDocument(doc);
}