Class SearchUtility
Inheritance
SearchUtility
Syntax
public static class SearchUtility
Methods
HighlightQuery(String, String, String, String)
Declaration
public static string HighlightQuery(string haystack, string query, string openTag = "<b>", string closeTag = "</b>")
Parameters
Returns
Matches(Single)
Declaration
public static bool Matches(float relevance)
Parameters
Type |
Name |
Description |
Single |
relevance |
|
Returns
Matches(String, String)
Declaration
public static bool Matches(string query, string haystack)
Parameters
Returns
Matches(ISearchResult)
Declaration
public static bool Matches(ISearchResult result)
Parameters
Returns
OrderableSearchFilter<T>(IEnumerable<T>, String, Func<T, String>)
Declaration
public static IEnumerable<SearchResult<T>> OrderableSearchFilter<T>(this IEnumerable<T> enumeration, string query, Func<T, string> haystack)
Parameters
Returns
Type Parameters
OrderableSearchFilter<T>(IEnumerable<T>, String, Func<T, String>, Func<T, String>)
Declaration
public static IEnumerable<SearchResult<T>> OrderableSearchFilter<T>(this IEnumerable<T> enumeration, string query, Func<T, string> haystack, Func<T, string> formerHaystack)
Parameters
Returns
Type Parameters
OrderableSearchFilter<THaystack, TResult>(IEnumerable<THaystack>, Func<THaystack, TResult>, String, Func<THaystack, String>)
Declaration
public static IEnumerable<SearchResult<TResult>> OrderableSearchFilter<THaystack, TResult>(this IEnumerable<THaystack> enumeration, Func<THaystack, TResult> getResult, string query, Func<THaystack, string> getHaystack)
Parameters
Returns
Type Parameters
Name |
Description |
THaystack |
|
TResult |
|
OrderableSearchFilter<THaystack, TResult>(IEnumerable<THaystack>, Func<THaystack, TResult>, String, Func<THaystack, String>, Func<THaystack, String>)
Declaration
public static IEnumerable<SearchResult<TResult>> OrderableSearchFilter<THaystack, TResult>(this IEnumerable<THaystack> enumeration, Func<THaystack, TResult> getResult, string query, Func<THaystack, string> getHaystack, Func<THaystack, string> getFormerHaystack)
Parameters
Returns
Type Parameters
Name |
Description |
THaystack |
|
TResult |
|
OrderByRelevance(IEnumerable<ISearchResult>)
Declaration
public static IEnumerable<object> OrderByRelevance(this IEnumerable<ISearchResult> results)
Parameters
Returns
OrderByRelevance<T>(IEnumerable<SearchResult<T>>)
Declaration
public static IEnumerable<T> OrderByRelevance<T>(this IEnumerable<SearchResult<T>> results)
Parameters
Returns
Type Parameters
OrderedSearchFilter<T>(IEnumerable<T>, String, Func<T, String>)
Declaration
public static IEnumerable<T> OrderedSearchFilter<T>(this IEnumerable<T> enumeration, string query, Func<T, string> haystack)
Parameters
Returns
Type Parameters
Relevance(String, String)
Declaration
public static float Relevance(string query, string haystack)
Parameters
Returns
UnorderedSearchFilter<T>(IEnumerable<T>, String, Func<T, String>)
Declaration
public static IEnumerable<T> UnorderedSearchFilter<T>(this IEnumerable<T> enumeration, string query, Func<T, string> haystack)
Parameters
Returns
Type Parameters