Creating an index

SimpleLucene has an index service (SimpleLucene.Impl.IndexService) that makes it easy to create and update a Lucene index.

The workflow is quite simple:

Create an IIndexWriter. For file system indexes you can use the DirectoryIndexWriter. You must specify the index location. Note: A MemoryIndexWriter can be found in the tests project (for writing to an in-memory index)

New up an IndexService, passing it an index writer. IndexService implements the IDisposable interface so you should call Dispose() when you are finished with it. This can be done implicitly via a using clause. When Dispose is called we commit and close
the internal Lucene IndexWriter. You can also choose to optimize the index (click here for details).

Call IndexEntities passing a collection of objects to index along with a delegate converter.