Im am using NHibernate.Search and Lucene.Net. I will ask if anyone
have experienced similar problems. This is the situation regarding the
following three classes.

    [Indexed]
    public class File
    {
        [Field]
        public virtual string FileId { get; private set; }

        [ContainedIn]
        public virtual List<Record> Records { get; private set; }
    }

    [Indexed]
    public class CaseFile : File
    {
        [Field]
        public virtual int CaseYear { get; set; }
        [Field]
        public virtual int CaseSequenceNumber { get; set; }
    }

    [Indexed]
    public class Record
    {
        [IndexedEmbedded]
        public virtual File ParentFile { get; set; }
    }


The problem is when I try to index the record class. The goal is to
get all fields of both the File class and the subclass CaseFile
contained in the Record index. But when i index the Record class I
only get fields of the File superclass in my Record index. The fields
of the CaseFile subclass are missing in the Record index.

I have also tried the [IndexedEmbedded(TargetElement =
typeof(CaseFile))] on the ParentFile propery in the Record class, but
this leads to totally empty indexes, or no indexing at all.

If I index the File class, the expected subclass properties are
indexed as expected in the File index.

Have anyone experienced similar problems with Hibernate/NHibernate
search?

-- 
You received this message because you are subscribed to the Google Groups 
"nhusers" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/nhusers?hl=en.

Reply via email to