Пример #1
0
        public ContentSearchResults Search(ContentSearchConfiguration config)
        {
            var provider       = _examineSearchProviderWrapper.ContentSearcher();
            var results        = _umbracoWrapper.TypedSearch(config.Text, true, provider.Name).Take(config.Limit);
            var contentResults = AsContentSearchResults(results);

            return(new ContentSearchResults(contentResults, config));
        }
Пример #2
0
        // GET: API/ContentSearch
        public object Index(string text)
        {
            var configuration = new ContentSearchConfiguration(text, 10);

            var results = _contentSearchService.Search(configuration);

            return(JsonConvert.SerializeObject(new ApiSuccessResponse(results)));
        }