November Happy Hour will be moved to Thursday December 5th.
AI OnAI Off
November Happy Hour will be moved to Thursday December 5th.
This should do the trick:
var searchResults = SearchClient.Instance.Search<SitePageData>() .Filter(x => x.RelatedPages.ReferencedPermanentLinkIds.Match(currentPage.ContentGuid)) .GetContentResult();
I have a similar issue although I have a Generic List of Content References and cant seem to get Find to return me results i have tried the following
searchContext = searchContext.Filter(x => x.Authors.Select(y => y.ID) .Match(author.Value));
We have a property RelatedPages that is of type ContentArea and exists on all pages. The property is used to drag'n drop related pages.
We like to use EPiServer Find to filter out pages that has is related to the current page.
I.e
var searchResults = SearchClient.Instance.Search()
.Filter(
(x => x.RelatedPages.Items.MatchContained(z => z.ContentLink.ID, currentPage.PageLink.ID)))
.GetContentResult();
This does not yield any results...
We have also tried this without luck:()
var searchResults = SearchClient.Instance.Search
.Filter(
(x => x.RelatedPages.Items.Select(y => y.ContentLink.ID).Match(currentPage.PageLink.ID)))
.GetContentResult();
Any clues what could be wrong?
We have decorated the base class for pages SitePageData with [IndexInContentAreas].