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 All,
I want to merge two result into a single result and want to Place result of first criterion at top and then add result of second criteria.
Any code snippet to achieve this?
Thanks
Hi Manish,
Can you post the code you already have?
Craig
var term_split = SearchTerm.Split(new[] { ',', ' ' }, StringSplitOptions.RemoveEmptyEntries); var Searcher = Examine.ExamineManager.Instance.SearchProviderCollection["MySearcher"]; var searchCriteria = Searcher.CreateSearchCriteria(BooleanOperation.And); var searchCriteriaPhrase = Searcher.CreateSearchCriteria(BooleanOperation.And); var fieldsToSearch = new[] { "type", "topic", "format", "nodeName", "createDate", "updateDate", "bannerTitle", "pageContentSection", "bannerText", "articleDescription", "shortDescription", "level1Tag", "level2Tag", "articleBody", "newsBody", "articlePublishedDate" }; IBooleanOperation filterPhrase = searchCriteriaPhrase.GroupedOr(fieldsToSearch, Phrase); IBooleanOperation filter = searchCriteria.GroupedOr(fieldsToSearch, term_split); IEnumerable<SearchResult> SearchResult = Searcher.Search(filter.Compile());
Basically I have two filter
and I want result of filterPhrase first then want to add result of filter just after this and want to show in this order.
Able to get something like this.
Searcher.Search(filterPhrase.Compile()).Concat(Searcher.Search(filter.Compile())).Distinct();
is working on a reply...
Write your reply to:
Upload image
Image will be uploaded when post is submitted
Examine search : How to merge two results in a single result
Hi All,
I want to merge two result into a single result and want to Place result of first criterion at top and then add result of second criteria.
Any code snippet to achieve this?
Thanks
Hi Manish,
Can you post the code you already have?
Craig
Basically I have two filter
and I want result of filterPhrase first then want to add result of filter just after this and want to show in this order.
Thanks
Able to get something like this.
Thanks
is working on a reply...