-
Notifications
You must be signed in to change notification settings - Fork 33
Index
joelmartinez edited this page Feb 11, 2012
·
1 revision
The Index will contain the corpus for the Analyzer to inspect for the tokens of a new Entry in order to categorize it.
public abstract class Index
{
public abstract int EntryCount { get; protected set; }
public abstract void Add(params Entry[] documents);
public abstract void Add(Entry document);
public abstract int GetTokenCount(string token);
}
Currently, there are two concrete implementation of the Index. The simplest, MemoryIndex, can be created by calling the CreateMemoryIndex method of the abstract Index class. There is another implementation called FileIndex which takes a filename/path in the constructor. You can additionally call .Open and .Save methods to load and save to disk.
Other implementations may include a DatabaseIndex, or even an Index based on storing the contents in a distributed cache system like memcached or Velocity