cms:CMSSearchResults set search index

Diego Gutierrez asked on December 22, 2014 15:13

how i can set the search index property on the CMSSearchResults. This is my code:

<cms:SearchBox runat="server" ID="SearchBox" SearchResultsPageUrl="~/Resultado-Busqueda.aspx" SearchMode="AnyWord" SearchButtonCssClass="btn-small" SearchButtonText="Buscar" PredictiveSearchIndexes="CustomChefSearch" SearchLabelText="" ShowSearchLabel="false" SearchTextRequired="true" />

<cms:CMSSearchResults runat="server" TransformationName="custom.RecetaChef.ChefResult" Path="/Recetas/%" ClassNames="custom.RecetaChef" SearchMode="AnyWord" ></cms:CMSSearchResults>

i created the index "CustomChefSearch" but i dont know how to set it.

Correct Answer

Zdeněk Cetkovský answered on December 22, 2014 16:03

Hello,

There's a smart search results control in

~\CMSModules\SmartSearch\Controls\SearchResults.ascx.cs

that you could use, which offers Indexes property , holding codenames of the used indexes separated by semicolon.

Hope this will help.

Regards, Zdenek

1 votesVote for this answer Unmark Correct answer

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