Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
Hi Team,
Currently in the url it is searching all the contents with the search term cancel.
https://www.businessdirect.bt.com/help/search/?SearchTerm=cancel
Currently in the url it is searching only one contents with the search term cancel
https://shop.bt.com/help/search/?SearchTerm=cancel
Coding:
if (string.IsNullOrWhiteSpace(searchTerm)) { return new List
var storegroupContentId = _storegroupService.GetContentIdForStoregroup(_store.StoreGroupId).ToString(); var searcher = _examineManagerProxy.GetSearchProvider(ExamineConstants.SearchProviderName); var searchCriteria = searcher.CreateSearchCriteria(); IBooleanOperation filter = null; foreach (var word in searchTerm.Split(' ')) { if (filter == null) { filter = searchCriteria.GroupedOr(new List<string> { DocTypeProperties.BodyText, ExamineConstants.NodeNameFieldName, DocTypeProperties.SummaryDescription, DocTypeProperties.MetaDescription, DocTypeProperties.Title, DocTypeProperties.HtmlPageTitle, DocTypeProperties.MetaKeywords, ExamineConstants.ComponentsContentFieldName }, new[] { word }); } else { filter = filter.Or().GroupedOr(new List<string> { DocTypeProperties.BodyText, ExamineConstants.NodeNameFieldName, DocTypeProperties.SummaryDescription, DocTypeProperties.MetaDescription, DocTypeProperties.Title, ExamineConstants.ComponentsContentFieldName }, new[] { word }); } } filter = filter.And().Field(ExamineConstants.PathSpaceDelimitedFieldName, storegroupContentId); filter = filter.And().Field(DocTypeProperties.HideFromSearch, "0"); if (contentType == SearchContentType.All) { filter = filter.And().GroupedOr(new List<string> { ExamineConstants.NodeTypeAliasFieldName }, new List<string> { SearchContentType.HelpArticle.ToString(), SearchContentType.InternalArticle.ToString(), SearchContentType.LearnMoreArticle.ToString(), SearchContentType.OtherArticle.ToString(), SearchContentType.PromotionsAndPressReleasesArticle.ToString() }.ToArray()); } else { filter = filter .And() .Field(ExamineConstants.NodeTypeAliasFieldName, contentType.ToString()); } var results = searcher.Search(filter.Compile()); return results.Select(MapSearchResult);
Could you please help me on this issue.
Thanks, Raja
Hi Raja
What Umbraco version are you using? version 6?
Alex
is working on a reply...
Write your reply to:
Upload image
Image will be uploaded when post is submitted
Search Single content not searching all the contents
Hi Team,
Currently in the url it is searching all the contents with the search term cancel.
https://www.businessdirect.bt.com/help/search/?SearchTerm=cancel
Currently in the url it is searching only one contents with the search term cancel
https://shop.bt.com/help/search/?SearchTerm=cancel
Coding:
if (string.IsNullOrWhiteSpace(searchTerm)) { return new List
Could you please help me on this issue.
Thanks, Raja
Hi Raja
What Umbraco version are you using? version 6?
Alex
is working on a reply...