c# - Mapping Error In Linq to Lucene.Net -


i have following document specs use in linq lucene

public class doc1 {  public doc1()  {     docs = new list<doc2>();  }   private ilist<doc2> docs{get;set;} }  public class doc2 {  //whatever  } 

the problem when try use this

   var provider = new lucenedataprovider(directory, version.lucene_30);    using (var session = provider.opensession<doc1>())    {         var m = new doc1();         session.add(m);    } 

the problem when execute code, following error

property event of type system.collections.generic.ilist`1[doc1] cannot converted system.string

please there way of doing this

thanks in advance

here goes full stack trace

[notsupportedexception: property event of type      system.collections.generic.ilist`1[doc2] cannot converted 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 


Comments

Popular posts from this blog

android - Gradle sync Error:Configuration with name 'default' not found -

java - Andrioid studio start fail: Fatal error initializing 'null' -

html - jQuery UI Sortable - Remove placeholder after item is dropped -