London Dev Meetup Rescheduled! Due to unavoidable reasons, the event has been moved to 21st May. Speakers remain the same—any changes will be communicated. Seats are limited—register here to secure your spot!
AI OnAI Off
London Dev Meetup Rescheduled! Due to unavoidable reasons, the event has been moved to 21st May. Speakers remain the same—any changes will be communicated. Seats are limited—register here to secure your spot!
Hi Dileep,
Are you saying this doesn't work even without Filter
override? What about the other slices you mention—pages and blocks—do they work?
Overall, this looks valid to me. What is the GET
request to /EPiServer/cms/Stores/contentstructure
returning when you type in a query?
I am using powerslice for pages and blocks and Media documents in my application. Below is the sample. However when I try to query with file name I dont see something matching the searched text rather the result is just alphabetical list.
[ServiceConfiguration(typeof(IContentQuery)), ServiceConfiguration(typeof(IContentSlice))]
public class DocumentsSlice : ContentSliceBase<CategorizableMedia>
{
public override string Name => "Documents";
public override int SortOrder => 2;
protected override ITypeSearch<CategorizableMedia> Filter(ITypeSearch<CategorizableMedia> searchRequest, ContentQueryParameters parameters)
{
var searchText = parameters?.AllParameters["q"] ?? "";
var filter = searchRequest.WildCardSearch($"{searchText.ToLower()}*", f => f.Name);
return base.Filter(filter, parameters);
}
}