When I make search It is searching for all but I want to limit it to only search for TV show nodeName.
I tried to limit it with <ExcludeNodeTypes/> but It doesn't work and I believe, I am overlooking some important details. Lastly, I managed to make it work with @if(c.Fields.Keys.Contains("ShowCoverImage")) but I don't know if it is the best option.
Examine with Razor - Excluding document types
Hey,
I am a new learner for Umbraco and I am working on a search solution for my project (v 4.7.1). I followed the example in farmcode's page.
It's working super fine but my problem is; I only want to search on specific Document Types. In my project I have structure like below;
TVShow (Doc Type: PageShow)
--Season (Doc Type: PageSeason)
----Episodes (Doc Type: PageEpisode)
When I make search It is searching for all but I want to limit it to only search for TV show nodeName.
I tried to limit it with <ExcludeNodeTypes/> but It doesn't work and I believe, I am overlooking some important details. Lastly, I managed to make it work with @if(c.Fields.Keys.Contains("ShowCoverImage")) but I don't know if it is the best option.
Maybe try deleting the generated index files (usually within the App_Data folder) therefore re-generating the index files.
Thank you for your answer and sorry for replying late.
I have figured out my problem. When I correctly refered to the Search Provider that I made (like below), It worked fine.
var searchResults = ExamineManager.Instance.SearchProviderCollection["MySearcher"].Search(searchString, true)
is working on a reply...