Don't miss out Virtual Happy Hour this Friday (April 26).

Try our conversational search powered by Generative AI!

Not getting full result

Vote:
 

Hi,

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)
					.DefaultFilter()
                    .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.

#85393
Apr 24, 2014 10:26
Vote:
 

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.

#85666
May 01, 2014 16:29
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.