I am working on a project that relies on Lucene.NET. Up to this point, I have had a class that had simple name/value properties (like int ID { get; set; }). However, I now need to add a new property to my index. The property is a type of List. Up to this point, I've updated my index like so...
MyResult result = GetResult();
using (IndexWriter indexWriter = Initialize())
{
var document = new Document();
document.Add(new Field("ID", result.ID.ToString(), Field.Store.YES, Field.Index.NOT_ANALYZE));
indexWriter.AddDocument(document);
}
Now, MyResult has a property that represents a List. How do I put that in my index? The reason I need to add it to my index is so that I can get it back out later.