Five New Optimizely Certifications are Here! Validate your expertise and advance your career with our latest certification exams. Click here to find out more
AI OnAI Off
Five New Optimizely Certifications are Here! Validate your expertise and advance your career with our latest certification exams. Click here to find out more
Could you look into the Find UI to see what is in the index of the content? In what field contains the "group" thing that you can spot?
Hi Quan,
Thanks for the reply.
Yes, I checked the FInd UI/Search & Navigation part of the CMS.
I loaded an example page and searched the content. the only occurrence of "group" appears in the SearchHitUrl field.
I want to stop Search and Navigation from searching on the URL field of the index, as right now, if you search for the site name (which is part of the domain name), it returns every page in the index, which is not the desired effect.
My site domain is for example acme-group.com, so any search for "acme group" or just "group" returns every page in the index, as all of them have a "SearchHitUrl" field with the domain name in it.
I have checked specific results JSON in the CMS, and the only instance of the word "acme" and/or "group" is in the URL field.
I have tried setting some Search conventions, clearing the index, and rebuilding, but I keep getting the same results.
or
SearchClient.Instance.Conventions.ForInstancesOf<BaseContentPage>() .ExcludeField(i => i.URLSegment) .ExcludeField(i => i.ExternalURL) .ExcludeField(i => i.LinkURL) .ExcludeField(i => i.StaticLinkURL) .ExcludeField(i => i.StaticLinkURL) .ExcludeField(i => (i as ISearchContent).SearchHitUrl) .ExcludeField("SearchHitUrl");
I am guessing I can't fully exclude this field, as otherwise, you would not be able to link to a result, but I just don't want to search upon that field.
My search query is currently:
var query = _client.Search<BaseContentPage>(_contentLanguageAccessor.Language.GetLanguage()) .For(model.SearchText) .InAllField();