A critical vulnerability was discovered in React Server Components (Next.js). Our systems remain protected but we advise to update packages to newest version. Learn More.
AI OnAI Off
A critical vulnerability was discovered in React Server Components (Next.js). Our systems remain protected but we advise to update packages to newest version. Learn More.
If you type .ToString() in your query, it will actually look for a field in the index named "ToString", which it won't find. Instead, try
(a => a.ID, content.ContentLink.ID))
Hi,
I have a product that I've added to a category and then linked to another one. When querying the first category the product is found, but not when querying on the second.
When looking at the data stored in Find I see:
"ParentNodeRelations": [ { "___types": [ "EPiServer.Core.ContentReference", ], "GetPublishedOrLatest$$bool": false, "IsExternalProvider$$bool": true, "$type": "EPiServer.Core.ContentReference, EPiServer", "ID$$number": 1073743194, "WorkID$$number": 0, "ProviderName$$string": "CatalogContent" }, { "___types": [ "EPiServer.Core.ContentReference", ], "GetPublishedOrLatest$$bool": false, "IsExternalProvider$$bool": true, "$type": "EPiServer.Core.ContentReference, EPiServer", "ID$$number": 1073743255, "WorkID$$number": 0, "ProviderName$$string": "CatalogContent" } ],And I try to query this by using the following C#:
this.SearchManager.Search().Filter(x => x.ParentNodeRelations().MatchContained(a => a.ToString(), content.ContentLink.ToString()))
The ID$$number in bold are the ID's of the original and linked categories. Unfortunatly this doesn't seem to work. The search results are empty. The COmmerce manager does display the product on both categories however.
Does anyone have an alternative solution or experience with querying linked products?
EPiServer.Find version 12.3.0 and EPiServer.Find.Commerce 9.7.0
Thanks!
/Mark