我正在使用 algolia angular instantsearch 和 TypesenseInstantSearchAdapter。我创建了自定义 ais-refinement 列表组件,现在卡住了,因为当我在构面列表中搜索时,我得到的结果有错别字。1 我尝试将 numTypos: 0 添加到 serverSetting,它看起来像这样:
this.typesenseInstantsearchAdapter = new TypesenseInstantSearchAdapter({
server: {
apiKey: this.data.serverSettings.apikey,
nodes: [
{
host: this.data.serverSettings.host,
port: this.data.serverSettings.port,
protocol: 'https',
},
],
},
additionalSearchParameters: {
queryBy: 'plaintexttitle',
numTypos: 0,
},
});
this.searchClient = this.typesenseInstantsearchAdapter.searchClient;
我还尝试添加到配置设置typoTolerance 或exactOnSingleWordQuery,它没有帮助
config:{
indexName: this.data.indexName,
searchClient: this.searchClient,
attributesForFaceting: this.attributes,
typoTolerance: false,
exactOnSingleWordQuery: 'word'}
我没有,也许我应该在创建细化列表时添加一些东西来连接参数?
ngOnInit() {
this.createWidget(connectRefinementList, {
// instance options
attribute: this.attr,
sortBy: this.defineSorting(this.sortBy),
limit: 50,
});
super.ngOnInit();
}