Mutiple search queries in sitefinity search

Posted by Community Admin on 04-Aug-2018 19:40

Mutiple search queries in sitefinity search

All Replies

Posted by Community Admin on 25-Feb-2013 00:00

Guys,

here is my problem, 

I am using the search results control of sitefinity.

I have a search term, let's say "Term1" which returns 5 results.

I have another term , lets say "Term2" which returns 3 results.

Now when I search for "Term1 Term2" sitefinity is returning just 1 result. It is trying to find the results which have both the terms in it. But I am looking for the opposite results, I dont want the intersection of these two terms, I want union of both the results, I mean I want to see 8 results (5 for term1 and 3 for term 2) 

Please let me know how we can do this.

 

Posted by Community Admin on 28-Feb-2013 00:00

Hi Prashant,

Currently our search control is built on the match case logic which finds exact match of the words that are being searched for. However, you have the option to override the initializeControls method in the Search Results control in order to extend the default logic of the control. There is one variable:

var result = searcher.Search(searchQuery, this.IndexCatalogue, skip, take, out totalItems);

However you can extend the functionality and create a foreach loop for each of words that are being searched. Then you can pass the results in the above variable.

Regards,
Victor Velev
the Telerik team
Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items

This thread is closed