Don't miss out Virtual Happy Hour this Friday (April 26).
Try our conversational search powered by Generative AI!
AI OnAI Off
Don't miss out Virtual Happy Hour this Friday (April 26).
var r = query.Client.Search<RoomPage>() .Filter(x => _contentRepository.Get<RoomPage>(x.PageLink).IsClosed()) .GetPagesResult();
While this returns 0 hits.
You shouldn't fetch the page again in the filter statement. It should work by just doing:
.Filter(x => x.AvailabilityStatus.Match(Rooms.Status.Closed))
/Henrik
Hi!
I've just started using Episerver Find and having trouble understanding how it works.
I'm trying to filter RoomPages by their availability status.
This is my code:
And my extension method looks like this:
This Match(Rooms.Status.Closed) does'nt seem to work since it returns Roompages with availability status open as well.
Can someone enlighten me in what I'm doing wrong or provide a better solution for achieving this.
Thanks in advance