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);
{"Fjärrservern returnerade ett fel: (400) Felaktig begäran.\r\nRemoteTransportException[[emea04p04data000004][inet[/10.130.160.12:9300]][indices:data/write/index]]; nested: MapperParsingException[failed to parse [ContentLink]]; nested: ElasticsearchIllegalArgumentException[unknown property [$type]]; "}
" 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"
Sorry for the Swedish error, dont know why I get that here, Fjärrservern returnerade ett fel: (400) Felaktig begäran = Remote server returned an error: (400) bad request