Index: Engine/DocumentBuilder.cs
===================================================================
--- Engine/DocumentBuilder.cs	(revision 1054)
+++ Engine/DocumentBuilder.cs	(working copy)
@@ -91,7 +91,7 @@
 
         public string IdentifierName
         {
-            get { return idMapping.Name; }
+            get { return idMapping.PropertyName; }
         }
 
         #endregion
@@ -192,12 +192,12 @@
 
         public Term GetTerm(object id)
         {
-            return new Term(IdentifierName, IdBridge.ObjectToString(id));
+            return new Term(GetIdKeywordName(), IdBridge.ObjectToString(id));
         }
 
         public String GetIdKeywordName()
         {
-            return IdentifierName;
+            return idMapping.Name;
         }
 
         public static System.Type GetDocumentClass(Document document)
Index: Mapping/AttributeBased/AttributeSearchMappingBuilder.cs
===================================================================
--- Mapping/AttributeBased/AttributeSearchMappingBuilder.cs	(revision 1054)
+++ Mapping/AttributeBased/AttributeSearchMappingBuilder.cs	(working copy)
@@ -197,9 +197,9 @@
                         throw new SearchException("Bridge for document id does not implement TwoWayFieldBridge: " + member.Name);
                     }
 
-                    documentMapping.DocumentId = new DocumentIdMapping(documentIdName, (ITwoWayFieldBridge)bridge, getter) {
-                        Boost = boost
-                    };
+                    documentMapping.DocumentId = new DocumentIdMapping(
+                        documentIdName, member.Name, (ITwoWayFieldBridge)bridge, getter
+                    ) { Boost = boost };
                 }
                 else
                 {
Index: Mapping/DocumentIdMapping.cs
===================================================================
--- Mapping/DocumentIdMapping.cs	(revision 1054)
+++ Mapping/DocumentIdMapping.cs	(working copy)
@@ -1,18 +1,33 @@
 using System;
 using System.Collections.Generic;
+using NHibernate.Mapping;
 using NHibernate.Properties;
 using NHibernate.Search.Bridge;
 
 namespace NHibernate.Search.Mapping {
     public class DocumentIdMapping : PropertyMappingBase
     {
-        public DocumentIdMapping(string name, ITwoWayFieldBridge bridge, IGetter getter) : base(getter)
+        public const string DefaultIndexedName = "Id";
+
+        public DocumentIdMapping(ITwoWayFieldBridge bridge, IGetter getter)
+            : this(DefaultIndexedName, RootClass.DefaultIdentifierColumnName, bridge, getter)
         {
+        }
+
+        public DocumentIdMapping(string name, ITwoWayFieldBridge bridge, IGetter getter) 
+            : this(name, RootClass.DefaultIdentifierColumnName, bridge, getter)
+        {
+        }
+
+        public DocumentIdMapping(string name, string propertyName, ITwoWayFieldBridge bridge, IGetter getter) : base(getter)
+        {
             this.Name = name;
+            this.PropertyName = propertyName;
             this.Bridge = bridge;
         }
 
         public string Name               { get; private set; }
+        public string PropertyName       { get; private set; }
         public ITwoWayFieldBridge Bridge { get; private set; }
 
         public float? Boost              { get; set; }
Index: Mapping/SearchMappingFactory.cs
===================================================================
--- Mapping/SearchMappingFactory.cs	(revision 1054)
+++ Mapping/SearchMappingFactory.cs	(working copy)
@@ -15,18 +15,22 @@
             System.Type mappingClass = GetMappingClass(cfg.GetProperty(Environment.MappingClass));
 
             object instance;
-            try {
+            try
+            {
                 instance = Activator.CreateInstance(mappingClass);
             }
-            catch (Exception ex) {
-                throw new SearchException("Failed to instantiate lucene analyzer with type " + mappingClass.FullName, ex);
+            catch (Exception ex)
+            {
+                throw new SearchException(
+                    "Could not create search mapping class '" + mappingClass.FullName + "'.", ex
+                );
             }
 
             if (!(instance is ISearchMapping))
             {
                 throw new SearchException(string.Format(
-                    "Lucene analyzer does not implement {0}: {1}",
-                    typeof(ISearchMapping).FullName, mappingClass.FullName
+                    "Search mapping class '{0}' does not implement '{1}'.",
+                    mappingClass.FullName, typeof(ISearchMapping).FullName
                 ));
             }
 
