Indexing subclass fields by IndexEmbedded

Description

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?

Environment

None

Activity

Show:

Details

Assignee

Reporter

Components

Affects versions

Priority

Who's Looking?

Open Who's Looking?
Created March 19, 2011 at 5:06 AM
Updated March 19, 2011 at 5:06 AM
Who's Looking?