namespace JiaZhiQuan.Common.ElasticSearch { public static class ESConstants { public static string DATE_FORMAT = "yyyy-MM-dd HH:mm:ss"; public static class ESIndexName { // ES文章表 public static string Post = "post_alias"; // ES Log表 public static string NLog = "n_log"; // ES IP地址映射表 public static string IpAddress = "ip_addr"; // ES 手机号地址映射表 public static string MobileAddress = "mobile_addr"; // ES 用户关注记录表 public static string UserFansRecords = "user_fans_record"; // ES 用户收藏记录表 public static string UserCollectRecords = "user_collect_record"; // ES 用户点赞记录表 public static string UserThumbsupRecords = "user_thumbsup_record"; // ES 商品数据 public static string MallGoods = "mall_goods"; } public static class ResponseKey { /// /// 最外层的aggregations对象 /// public static string AGGREGATIONS = "aggregations"; /// /// aggregations统计结果对象的key /// public static string AGGREGATIONS_COUNT = "doc_count"; /// /// 最外层的hits对象 /// public static string HITS = "hits"; /// /// ES返回的数据结构中有两层hits,这个是第二层的 /// 这个对象包含index的基础信息以及返回的数据 /// public static string HITS_HITS = "hits"; /// /// 行数据的ID /// public static string HITS_HITS_SOURCE = "_source"; /// /// 返回的查询结果数据 /// public static string HITS_HITS_ID = "_id"; /// /// 查询结果total对象 /// public static string HITS_TOTAL = "total"; /// /// 数据条数 /// public static string HITS_TOTAL_VALUE = "value"; } } }