示例#1
0
        private IEnumerable <SearchResultItem> FindSimilar()
        {
            //add 1 to max results as we will ignore first item becuase it will be
            //current document itself
            var more = new MoreUmbracoDocsLikeThis(CurrentDocId, IndexToSearch, MaxResults + 1, PropertiesToSearch);

            List <SearchResultItem> itemsFound = more.FindMoreLikeThis().ToList();

            more.Dispose();

            return(itemsFound);
        }
        private IEnumerable<SearchResultItem> FindSimilar()
        {
            //add 1 to max results as we will ignore first item becuase it will be
            //current document itself
            var more = new MoreUmbracoDocsLikeThis(CurrentDocId, IndexToSearch, MaxResults + 1, PropertiesToSearch);

            List<SearchResultItem> itemsFound = more.FindMoreLikeThis().ToList();
            more.Dispose();

            return itemsFound;
        }