using System; using System.Collections.Generic; using System.Text; namespace JiaZhiQuan.Common.ElasticSearch.Models { /* DELETE /post PUT /post { "mappings": { "properties": { "id": { "type": "long" }, "userId": { "type": "long" }, "userAlias": { "type": "text", "analyzer": "ik_smart" }, "title": { "type": "text", "analyzer": "ik_smart" }, "type": { "type": "integer" }, "categoryType": { "type": "integer" }, "onlyInTopic": { "type": "integer" }, "createAt": { "type": "date", "format": "yyyy-MM-dd HH:mm:ss" }, "state": { "type": "integer" }, "primaryType": { "type": "integer" }, "primaryTypes": { "type": "keyword" }, "resourceCodes": { "type": "keyword" }, "resourceNames": { "type": "keyword" }, "topicId": { "type": "integer" }, "topicName": { "type": "text", "analyzer": "ik_smart" }, "topicIds": { "type": "integer" }, "topicNames": { "type" : "text", "analyzer": "ik_smart", "fields" : { "keyword" : { "type" : "keyword", "ignore_above" : 256 } } }, "validTopicIds": { "type": "integer" }, "validTopicNames": { "type" : "text", "analyzer": "ik_smart", "fields" : { "keyword" : { "type" : "keyword", "ignore_above" : 256 } } }, "summary": { "type": "text", "analyzer": "ik_smart" }, "noMoreCont": { "type": "integer" }, "thumbnails": { "type": "text", "index": false }, "contentState": { "type": "integer" }, "videoId": { "type": "keyword" }, "content": { "type": "text", "index": false }, "coverWidth": { "type": "integer" }, "coverHeight": { "type": "integer" }, "tags": { "type": "keyword" }, "isBest": { "type": "integer" }, "subjectiveScore": { "type": "float" }, "hot": { "type": "float" }, "previewable": { "type": "boolean" }, "reprintSource": { "type": "text", "index": false }, "reprintLink": { "type": "text", "index": false } } } } */ /// /// ES中只记录通过审核的 /// public class ESPostModel { public long id { get; set; } public long userId { get; set; } public string userAlias { get; set; } public string title { get; set; } public int type { get; set; } public int categoryType { get; set; } public int onlyInTopic { get; set; } public string createAt { get; set; } /// /// 状态:0 待审核 1 通过 2 未通过 -1 删除 /// public int state { get; set; } /// /// 文章所属主一级分类的值:如A股=1 港股=2 美股=4 英股=8 /// public int primaryType { get; set; } /// /// 文章所属所有一级分类的值 /// public string[] primaryTypes { get; set; } public string[] resourceCodes { get; set; } public string[] resourceNames { get; set; } public int topicId { get; set; } public string topicName { get; set; } /// /// 此文章关联的所有话题编号, 编号与名称一一对应 /// public int[] topicIds { get; set; } public string[] topicNames { get; set; } /// /// 此文章关联的所有有效的话题编号, 编号与名称一一对应 /// public int[] validTopicIds { get; set; } public string[] validTopicNames { get; set; } public string summary { get; set; } public int noMoreCont { get; set; } public string thumbnails { get; set; } public int contentState { get; set; } public string videoId { get; set; } public string content { get; set; } public int coverWidth { get; set; } public int coverHeight { get; set; } public string[] tags { get; set; } public int isBest { get; set; } /// /// 平台主观策略分 /// public float subjectiveScore { get; set; } public double hot { get; set; } = 0; public bool previewable { get; set; } public string reprintSource { get; set; } public string reprintLink { get; set; } } }