I am working on a website which uses EPiServer Find to search for pages and documents.
The problem is that whenever I search, I am not getting the full result.
For example, when I search for the phrase "och" using the Find GUI in the Find tab, I get 153 hits, the most being pages.
But when I do the same search in code, I only get 14 hits, and they're all documents.
var findQuery = SearchClient.Instance.UnifiedSearchFor(searchQuery)
.FilterFacet(SearchFacets.PageData, x => x.MatchTypeHierarchy(GetFacetType(SearchFacets.PageData)))
.FilterFacet(SearchFacets.Articles, x => x.MatchType(GetFacetType(SearchFacets.Articles)))
.FilterFacet(SearchFacets.Events, x => x.MatchType(GetFacetType(SearchFacets.Events)))
.FilterFacet(SearchFacets.Persons, x => x.MatchType(GetFacetType(SearchFacets.Persons)))
.FilterFacet(SearchFacets.News, x => x.MatchType(GetFacetType(SearchFacets.News)))
.TermsFacetFor(x => x.SearchCategories);
I am not seeing any pattern as some phrases gives pages of all types. The only repeating thing is the difference between my search using code and the Find GUI.
What may be the reason for this difference?
Thanks for helping.
Find UI does a much rawer type of search and listing than what you typically code in your templates.
I'm guessing that you need to setup your UnifiedSearchRegistry further in your Indexing Conventions.