|
@@ -885,15 +885,15 @@ func EsComprehensiveSearch(keyWord string, startSize, pageSize int) (result []*S
|
|
|
}
|
|
|
}
|
|
|
//searchItem.IsSummary = article.IsSummary
|
|
|
- if len(searchItem.Body) == 0 {
|
|
|
- bodyRune := []rune(article.BodyText)
|
|
|
- bodyRuneLen := len(bodyRune)
|
|
|
- if bodyRuneLen > 100 {
|
|
|
- bodyRuneLen = 100
|
|
|
- }
|
|
|
- body := string(bodyRune[:bodyRuneLen])
|
|
|
- searchItem.Body = []string{body}
|
|
|
- }
|
|
|
+ //if len(searchItem.Body) == 0 {
|
|
|
+ // bodyRune := []rune(article.BodyText)
|
|
|
+ // bodyRuneLen := len(bodyRune)
|
|
|
+ // if bodyRuneLen > 100 {
|
|
|
+ // bodyRuneLen = 100
|
|
|
+ // }
|
|
|
+ // body := string(bodyRune[:bodyRuneLen])
|
|
|
+ // searchItem.Body = []string{body}
|
|
|
+ //}
|
|
|
var title string
|
|
|
if len(v.Highlight["Title"]) > 0 {
|
|
|
title = v.Highlight["Title"][0]
|
|
@@ -1447,14 +1447,18 @@ func GetResourceDataEsList(list []*SearchComprehensiveItem, user *models.WxUserI
|
|
|
if v.ProductInterior != nil && v.SourceId == vList.SourceId {
|
|
|
v.ProductInterior.Title = vList.Title
|
|
|
}
|
|
|
- if v.IndustrialResource != nil && v.SourceId == vList.SourceId {
|
|
|
- v.Source = "industrialsource"
|
|
|
- v.IndustrialResource.PublishDate = vList.PublishDate
|
|
|
- }
|
|
|
- if v.SourceId == vList.SourceId {
|
|
|
+ //if v.IndustrialResource != nil && v.SourceId == vList.SourceId {
|
|
|
+ // v.IndustrialResource.UpdateTime = vList.PublishDate
|
|
|
+ //}
|
|
|
+ if v.SourceId == vList.SourceId && v.Source == vList.Source {
|
|
|
items = append(items, v)
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
+ for _, v := range items {
|
|
|
+ if v.IndustrialResource != nil {
|
|
|
+ v.Source = "industrialsource"
|
|
|
+ }
|
|
|
+ }
|
|
|
return
|
|
|
}
|