Welcome to the navigation

Proident, amet, enim ad eu cillum fugiat id ex adipisicing tempor non qui aute eiusmod aliqua, minim consequat, velit veniam, quis dolor aliquip est nisi. Sed esse enim et non duis laborum, consectetur velit amet, fugiat irure qui lorem ullamco sit nostrud ea cillum laboris nisi officia dolor proident, in

Yeah, this will be replaced... But please enjoy the search!

EPiServer Find Wildcard searching

This is a bit of a hidden feature in EPiServer Find. Typically when you want wildcard searching miscellaneous blogs will make us use the EPiServer UnifiedSearch. There is a much simpler solution than so.

public static class SearchExtensions
{
    public static IQueriedSearch<T> WildCardSearch<T>(this ITypeSearch<T> search, string query)
    {
        return search.For<T>(query, q => q.Query = string.Concat("*", query, "*"));
    }
}

Use it like this

var result = SearchClient.Instance.Search<FAQItem>()
                    .WildCardSearch(query)
                    .OrderByDescending(x => x.Name)
                    .FilterForVisitor()
                    .GetContentResult();