何时传递给此代码:“ ist aconext吗?”它什么也没有回复我。 但是,当我仅输入“ Aconext”时,它会通过天蓝色搜索向我发送答案。这里怎么了。
这是主要的app.js。 MS文档add azure search使用了azure搜索和搜索对话框库,我正在按照real estate demo search
中的步骤进行操作请帮助我找出答案。或者是直接从对话框中包含“天蓝色”搜索而不是调用库的更简单方法。会很有帮助的。
bot.dialog('SearchDialog', [
function (session, args) {
SearchLibrary.begin(session);
},
function (session, args, results) {
// Process selected search results
session.send(
'Done! For future reference, you selected these properties: %s',
args.selection.map(function (i) { return i.key; }).join(', '));
}
]).triggerAction({
matches: 'Search.Aco'
});
var azureSearchClient = AzureSearch.create('search', 'key', 'index');
var jobsResultsMapper = SearchLibrary.defaultResultsMapper(jobToSearchHit);
// Register Search Dialogs Library with bot
bot.library(SearchLibrary.create({
multipleSelection: true,
search: function (query) { return azureSearchClient.search(query).then(jobsResultsMapper); },
refiners: ['people', 'content', 'location']
}));
// Maps the AzureSearch Job Document into a SearchHit that the Search Library can use
function jobToSearchHit(acosearch) {
return {
key: acosearch.id,
title: acosearch.metadata_storage_name,
description: acosearch.content.substring(0, 100)+"...",
documenturl:acosearch.DocUrl,
imageUrl: acosearch.imageurl
};
}