Exemplo n.º 1
0
        public IActionResult AdvancedResults(SearchContentDTO searchedContent)
        {
            SearchPagination pagination = CreatePagination(searchedContent);

            ESReadWebsitesManager client = new ESReadWebsitesManager();
            var searchResult             = client
                                           .FullTextSearchAdvanced(searchedContent, pagination)
                                           .ToDto(pagination, searchedContent);

            return(Ok(searchResult));
        }
        public IActionResult AdvancedResults(SearchContentDTO searchedContent)
        {
            //ViewData["SearchedContent"] = searchedContent;

            SearchPagination pagination = CreatePagination(searchedContent);

            ESReadWebsitesManager client = new ESReadWebsitesManager();
            var searchResult             = client
                                           .FullTextSearchAdvanced(searchedContent, pagination)
                                           .ToDto(pagination, searchedContent);

            if (searchResult.SearchHits.Count == 0)
            {
                return(NotFound());
            }

            return(Ok(searchResult));
        }