123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119 |
- package services
- import (
- "fmt"
- )
- func Task() {
- fmt.Println("start")
- //keyWord := "专家"
- //pageSize := 20
- //SearchByKeyWord(keyWord, pageSize)
- //SaveData()
- //GetIndustryMap()
- //解析报告
- //GetArticleExpert()
- //SearchByKeyWordQuery("")
- //AddMap()
- //同步数据
- //ImportData()
- //AddMap()
- //Search("光伏行业")
- //修复报告内容
- //GetArticleAll()
- //
- // indexName:="article"
- // mappingJson := `{
- // "mappings": {
- // "dynamic": true,
- // "properties": {
- // "ArticleId": {
- // "type": "integer"
- // },
- // "Title": {
- // "type": "text",
- // "analyzer": "ik_smart"
- // },
- // "TitleEn": {
- // "type": "text",
- // "analyzer": "ik_smart"
- // },
- // "UpdateFrequency": {
- // "type": "text",
- // "analyzer": "ik_smart"
- // },
- // "CreateDate": {
- // "type": "text",
- // "analyzer": "ik_smart"
- // },
- // "PublishDate": {
- // "type": "text",
- // "analyzer": "ik_smart"
- // },
- // "Abstract": {
- // "type": "text",
- // "analyzer": "ik_smart"
- // },
- // "CategoryName": {
- // "type": "text",
- // "analyzer": "ik_smart"
- // },
- // "SubCategoryName": {
- // "type": "text",
- // "analyzer": "ik_smart"
- // },
- // "InterviewDate": {
- // "type": "text",
- // "analyzer": "ik_smart"
- // },
- // "ExpertBackground": {
- // "type": "text",
- // "analyzer": "ik_smart"
- // },
- // "ExpertNumber": {
- // "type": "text",
- // "analyzer": "ik_smart"
- // },
- // "Department": {
- // "type": "text",
- // "analyzer": "ik_smart"
- // },
- // "ArticleIdMd5": {
- // "type": "text",
- // "analyzer": "ik_smart"
- // }
- // }
- // }
- //}`
- // CreateIndex(indexName,mappingJson)
- //插入数据
- type ElasticArticleDetail struct {
- ArticleId int `description:"报告id"`
- Title string `description:"标题"`
- TitleEn string `description:"英文标题 "`
- UpdateFrequency string `description:"更新周期"`
- CreateDate string `description:"创建时间"`
- PublishDate string `description:"发布时间"`
- Abstract string `description:"摘要"`
- CategoryName string `description:"一级分类"`
- SubCategoryName string `description:"二级分类"`
- IsCollect bool `description:"是否收藏:true,已收藏,false:未收藏"`
- IsInterviewApply bool `description:"是否申请访谈:true,已申请,false:未申请"`
- BodyText string `description:"内容"`
- InterviewApplyStatus string `description:"当前访谈申请状态:'待邀请','待访谈','已完成','已取消'"`
- InterviewDate string `description:"访谈时间"`
- ExpertBackground string `description:"专家背景"`
- ExpertNumber string `description:"专家编号"`
- Department string `description:"作者"`
- SellerMobile string `description:"销售手机号"`
- SellerName string `description:"销售名称"`
- ArticleIdMd5 string `description:"纪要id"`
- }
- fmt.Println("end")
- }
|