Smart Search Filter on two indexes

eSiteful Corporation asked on November 25, 2015 22:15

Version 8.2 EMS I have two indexes on a site. One is a standard Kentico Smart Search Index, the other is a custom index. The standard index contains data from the Kentico site, the custom index contains data from an external site (an archive site). I am using the SmartSearchFilter webpart and the SmartSearchDialogWithResults webpart. The filter properties values are:

+index;CodeNameOfTheStandardIndex;Current Site
+index;CodeNameOfTheArchiveIndex;Archive Site

I am using radio buttons for the UI.

When I do a search I get results from both indexes but when I select one of the other radio buttons I get "No results were found."

I am unsure of how to reference the indexes in the values property. I can find examples for referencing index fields but not the index itself.

Correct Answer

Dawid Jachnik answered on November 26, 2015 10:59


I think you can't do it by filters. You need to create custom type of control (or customize your filter) from which SmartSearchDialogWithResults will be getting the index name and ascribing it to srchResults.Indexes

0 votesVote for this answer Unmark Correct answer

Recent Answers

Michal Samuhel answered on November 26, 2015 12:02


Dawid is correct and this is not available out of the box. The search box applies all the indexes that are set in the settings. As the search index is considered to be a back and part and the user usually does not know what does the index contain.

For example you can use two web parts on the site with different indexes and enable only one of them in the codebehind where the code would pass information what index had been chosen. Or you can set the index that you want to use directly in the code of the web part with use of the query param.

0 votesVote for this answer Mark as a Correct answer

eSiteful Corporation answered on December 4, 2015 19:20

Thank you for the answers. I ended up using the Tabs WebPart and putting results for each index in a separate tab.

0 votesVote for this answer Mark as a Correct answer

   Please, sign in to be able to submit a new answer.