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

Last edited Feb 17, 2010 at 4:30 AM by joelmartinez, version 3

Comments

No comments yet.