Hi,
I'm trying using NHibernate.Search to get Lucene.NET Score through projections.
My domain object implements an interface IScorableEntity
public interface IScorableEntity
{
float Score { get; set; }
}
...
IFullTextSession session = Search.CreateFullTextSession(database.Session);
IFullTextQuery textQuery = session.CreateFullTextQuery(query, typeof(Book));
textQuery.SetProjection(ProjectionConstants.SCORE);
var books = textQuery.List<Book>();
Without the score projection all is working, but with it a got an exception :
InvalidCastException : At least one element in the source array could not be cast down to the destination array type.