I have implemented the Search Module with my DXA 1.5 application using this script:
.\web-install.ps1 -distDestination "D:\Projects\Site" -searchProviderType AwsCloudSearchProvider
And I have configured my endpoints in CMS, now my Components are indexed at Amazon cloud.
But when I search content in search box using DXA SearchModule I'm getting null reference error
Object reference not set to an instance of an object.
After debugging the code, I identified that baseModelType
is null in below method
public Type GetModelTypeFromSemanticMapping(Type baseModelType)
in SemanticSchema.cs
file.
Detailed Error
ERROR - Object reference not set to an instance of an object. System.NullReferenceException: Object reference not set to an instance of an object. at Sdl.Web.Common.Mapping.SemanticSchema.<>c__DisplayClass25_0.b__0(Type t) in D:\Projects\MPSDXAmeyankTest\Sdl.Web.Common\Mapping\SemanticSchema.cs:line 120 at System.Linq.Enumerable.WhereEnumerableIterator
1.MoveNext() at System.Linq.Buffer
1..ctor(IEnumerable1 source) at System.Linq.Enumerable.ToArray[TSource](IEnumerable
1 source) at Sdl.Web.Common.Mapping.SemanticSchema.GetModelTypeFromSemanticMapping(Type baseModelType) in D:\Projects\MPSDXAmeyankTest\Sdl.Web.Common\Mapping\SemanticSchema.cs:line 120 at Sdl.Web.Tridion.Mapping.DefaultModelBuilder.BuildEntityModel(EntityModel& entityModel, IComponent component, Type baseModelType, Localization localization) at Sdl.Web.Tridion.Mapping.DefaultModelBuilder.BuildEntityModel(EntityModel& entityModel, IComponentPresentation cp, Localization localization)
at Sdl.Web.Tridion.Mapping.ModelBuilderPipeline.CreateEntityModel(IComponentPresentation cp, Localization localization) at Sdl.Web.Tridion.Mapping.DefaultModelBuilder.BuildPageModel(PageModel& pageModel, IPage page, IEnumerable`1 includes, Localization localization)
Any Guidelines will be appreciated.