November Happy Hour will be moved to Thursday December 5th.
AI OnAI Off
November Happy Hour will be moved to Thursday December 5th.
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.
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);
}
}