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
So, I successfully migrated my site from Umbraco 7 to 8. Initially I also managed to make my search feature work again.
Then I implemented using language variations. Now the search does not work.
My goal is to search the site (ideally in just the "support" section) and show the results. But only per language.
The current code follows:
var searchTerm = string.Empty;
searchTerm = string.IsNullOrEmpty(Request["search"]) ? string.Empty : Request["search"];
if (searchTerm != string.Empty)
if(ExamineManager.Instance.TryGetIndex("ExternalIndex", out var index))
var searcher = index.GetSearcher();
var results = searcher.CreateQuery("content").NodeTypeAlias("SupportItem").And().Field("bodyText", searchTerm).Execute();
<h2 class="header-greenline">@Umbraco.GetDictionaryValue("Results for") "@searchTerm"</h2>
@foreach (var result in results)
if (result.Id != null)
var node = Umbraco.Content(result.Id);
<p>@Umbraco.GetDictionaryValue("No search results") @searchTerm</p>
The above code consistenly returns zero results.
I hope someone can help my in the right direction. Thank you!
I believe that once you turn on multi-language features the indexes change and append the culture code to the end of their field name (only on the multi-lingual fields) ... so if your bodyText is now multi lingual and is available for both English(UK) and Welsh(UK), I believe 2 fields now exists in the index:
bodyText_enGB and bodyText_cyGB
If you update your search query to take this into account it should start working I think.
Thank you very much for directing me here.
I checked the index via backoffice and indeed the results are sorted in languages per fields. bodyText is now bodyText_da-dk for Danish edition.
I'll continue work on this to accomodate the different languages.
is working on a reply...
Write your reply to:
Image will be uploaded when post is submitted