trullock/Fluent-NHibernate-Search — Issue #2: Problem with custom field bridge
Author: sadomovalex
Created: 2011-12-06 16:47:30+00:00
State: open

Hello,
thanks for this project! It greatly helped us to simplify search mappings. I found one issue: when we configure mapping using custom bridge (.Bridge().Custom()) the following exception is thrown:
NHibernate.HibernateException: Unable to guess IFieldBridge for Categories
at NHibernate.Search.Bridge.BridgeFactory.GuessType(String fieldName, Type fieldType, IFieldBridgeDefinition fieldBridgeDefinition, IDateBridgeDefinition dateBridgeDefinition)
at FluentNHibernate.Search.Mapping.Parts.FluentMappingPart..ctor(PropertyInfo propertyInfo)
at FluentNHibernate.Search.Mapping.Parts.FieldMappingPart..ctor(PropertyInfo propertyInfo)
at FluentNHibernate.Search.Mapping.DocumentMap`1.Map(Expression`1 property)

I used simple workaround for this, which is described here: http://sadomovalex.blogspot.com/2011/12/fix-problem-in-fluent-nhibernate-search.html. It worked in my case. May be it will be useful for someone.