Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
I am trying to get some search functionality working on a website and i was wondering why i am getting the below issue when following the documentation here:
var query = "campaigns";
var searcher = Examine.ExamineManager.Instance.SearchProviderCollection["ExternalSearcher"];
var searchCriteria = searcher.CreateSearchCriteria(Examine.SearchCriteria.BooleanOperation.Or);
var searchQuery = searchCriteria.Field("nodeName", query.Boost(5)).Or().Field("nodeName", query.Fuzzy()).And().OrderByDescending("createDate");
var searchResults = searcher.Search(searchQuery.Compile());
@foreach (var result in searchResults)
Thank you :)
That documentation looks to need a small tweak. To access the Url and Name attributes I'm guessing it's expecting to loop through an IEnumerable of IPublishedContent, so try changing to the following.
@foreach (var result in Umbraco.TypedContent(searchResults.Select(x=>x.Id)))
Thank you David :)
is working on a reply...
Write your reply to:
Image will be uploaded when post is submitted