[TOC]
以模块的方式对ElasticSearch进行集成
dotnet add package Abp.ElasticSearch.Core
{
"ElasticSearchConfiguration": {
"ConnectionString": "http://localhost:9200",
"AuthUserName": "elastic",
"AuthPassWord": "elastic",
"UseAuditingLog": true,
"AuditingLogIndexName": "abp-audit-log"
}
}
AuditingLogIndexName默认值:abp-audit-log
Startup.cs -> ConfigureServices
services.AddElasticSearch(options =>
{
_appConfiguration.GetSection("ElasticSearchConfiguration").Bind(options);
});
添加依赖:AbpElasticSearchModule
[DependsOn(typeof(AbpElasticSearchModule))]
public class XXXCoreModel
{
}
MIT.