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.
I tried to add wildcard search filter but still the result is same. What am I missing.
[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);
}
}