예제 #1
0
        public SearchResults <T> CreateSearchResults <T>(Sitecore.ContentSearch.Linq.SearchResults <T> searchResults)
        {
            var results = new SearchResults <T>
            {
                Hits      = searchResults.Hits.Select(searchHit => CreateSearchHit <T>(searchHit)),
                Facets    = searchResults.Facets,
                TotalHits = searchResults.TotalSearchResults
            };

            return(results);
        }
 protected virtual TResult[] GetReturnDocuments(TOptions options, Sitecore.ContentSearch.Linq.SearchResults <TResult> results)
 {
     return(results.Hits.Select(x => x.Document).ToArray());
 }