I have the following Document Specs for Use in Linq TO Lucene
public class Doc1
{
public Doc1()
{
Docs = new List<Doc2>();
}
private IList<Doc2> Docs{get;set;}
}
public Class Doc2
{
//whatever
}
The Problem is when I try to Use it like this
var provider = new LuceneDataProvider(directory, Version.LUCENE_30);
using (var session = provider.OpenSession<Doc1>())
{
var m = new Doc1();
session.Add(m);
}
The Problem is when I execute this code, I get the following error
Property Event of type System.Collections.Generic.IList`1[Doc1] cannot be converted from System.String
Please is there another way of doing this
Thanks in advance
Here goes the Full Stack Trace
[NotSupportedException: Property Event of type System.Collections.Generic.IList`1[Doc2] cannot be converted from System.String]
Lucene.Net.Linq.Mapping.FieldMappingInfoBuilder.GetConverter(PropertyInfo p, Type type, FieldAttribute metadata) +487
Lucene.Net.Linq.Mapping.FieldMappingInfoBuilder.BuildPrimitive(PropertyInfo p, Type type, FieldAttribute metadata, Version version, Analyzer externalAnalyzer) +63
Lucene.Net.Linq.Mapping.FieldMappingInfoBuilder.Build(PropertyInfo p, Version version, Analyzer externalAnalyzer) +364
Lucene.Net.Linq.Mapping.ReflectionDocumentMapper`1.BuildFieldMap(IEnumerable`1 props) +184
Lucene.Net.Linq.Mapping.ReflectionDocumentMapper`1..ctor(Version version, Analyzer externalAnalyzer) +77
Lucene.Net.Linq.LuceneDataProvider.OpenSession(ObjectLookup`1 lookup) +67
Lucene.Net.Linq.LuceneDataProvider.OpenSession(ObjectFactory`1 factory) +142
Lucene.Net.Linq.LuceneDataProvider.OpenSession() +114