I have small issue with search results where its showing duplicate items because it has different version created and sometimes it only shows default language version.
The code i have is as per below,
Below method returns IQueryable<>
return context.GetQueryable<SearchResult>().Where(item => item["Enable"] = "1");
After I get the results I can see different version of each item, later on i do filtering/sorting as per below,
results.AddRange(query.Where(item => item.Title.Equals("keywordinput")) .OrderByDescending(item => item.SortOrder) .ThenBy(item => item.DateTime));
Soon as i use the linq, it's only showing default language not based on context language. I've tried applying language when running
GetQueryable<> but then I only get item that has language but I would also like to display other items that don't have language i.e. the default language.
Is there a way I can do this? for example suppose i have
Item1 has two version en and us
Item2 has only one version en
So if someone search "item" then im expecting two results to be displayed
Item1 - us version
Item2 - en version