Try our conversational search powered by Generative AI!

Client.CreateFromConfig() issues

Vote:
 

So we reasently upgraded to Episerver.Find 13.2.5 together with all its dependencies, this created som issues for us such as we could not create pages in CMS. After some troubleshooting together with episerver support we got the directive to remove the line below from our structure map:

c.For<IClient>().Singleton().Use(Client.CreateFromConfig());

Doing this broke our product index. I figured this was because we used the .Net Client in our index methods, so after removing the line above from our sturctured map should have broke the initialization for it.

So after that I found a post here in the forum about using the .NET API client vs SearchClient.Instance and also Episerver find 101 both by Joel Abrahamsson.

So I replaced al lthe places where we used .Net API client in the solution and used SearchClient.Instance instead.

This solved our problems so that we could create CMS pages again and all that we wanted to be indexed got indexed upon creation. But we still had the same issue where we could not index products.

Im catching this error when running SearchClient.Instance.Index(indexProduct);

EPiServer.Find.ServiceException: The remote server returned an error: (400) Bad Request.
RemoteTransportException[[emea04p04data000001][inet[/10.130.160.9:9300]][indices:data/write/index]]; nested: MapperParsingException[failed to parse [ContentLink]]; nested: ElasticsearchIllegalArgumentException[unknown property [$type]]; ---> System.Net.WebException: The remote server returned an error: (400) Bad Request.

" at EPiServer.Find.Api.Command.GetResponse[TResult](IJsonRequest request)\r\n at EPiServer.Find.Api.IndexCommand.Execute()\r\n at Knowit.NilsonGroup.Core.Features.Search.Services.ProductIndexService.Index(SearchProduct indexProduct, Boolean useSingleDelete) in C:\\_Avensia\\Projects\\Nilsongroup\\ecommerce\\src\\Knowit.NilsonGroup.Core\\Features\\Search\\Services\\ProductIndexService.cs:line 195"


Update: So the issue with the error above was that we can't index contentReferences anymore? We had one prop with contentReferences and one list with contentReferences, removig these fixed this issue.

#216066
Edited, Jan 23, 2020 7:10
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.