如何在 kentico 中通过代码添加智能搜索对话框并添加索引?

How to add smart search dialog by code in kentico and add an index?

我正在尝试添加这样的代码

<cms:SearchDialog ID="SearchDialog" runat="server" />

在母版页中,但似乎是 SQL 搜索对话框,我想使用智能搜索对话框通过代码添加页面爬虫索引。

通常情况下,母版页上的搜索框是一个简单的重定向到 /search 页面并带有 url 参数。例如,您有一个带有按钮的文本框和一些 javascript 来执行重定向,它可能有一个 URL 像这样:

/search?searchtext=the+big+lazy+dog&searchmode=allwords

无需再使搜索复杂化。只需确保您的搜索页面上有搜索结果 Web 部件,它将自动获取 url 参数。