internal virtual void PostProcess(HighlightFieldDictionary highlights) { if (highlights?.Any(h => h.Key == nameof(Summary)) == true) { Summary = string.Join("...", highlights.First(p => p.Key == nameof(Summary)).Value.Highlights); } }
public static object Highlight(this HighlightFieldDictionary highlightFieldDictionary, object data, string key) { var result = highlightFieldDictionary == null ? data : highlightFieldDictionary.Keys.Contains(key) ? string.Join("", highlightFieldDictionary[key].Highlights) : data; return(result); }
public SearchResultItem(HighlightFieldDictionary highlights, T source) { this.Highlight = highlights; this.Source = source; }