|
@@ -148,7 +148,7 @@ func WechatArticleEsDel(docId string) (err error) {
|
|
|
}
|
|
|
|
|
|
func WechatArticleEsSearch(keywordStr string, wechatPlatformId, from, size int, sortMap map[string]string) (total int64, list []*WechatArticleAndPlatform, err error) {
|
|
|
- indexName := utils.DATA_INDEX_NAME
|
|
|
+ indexName := utils.EsWechatArticleName
|
|
|
list = make([]*WechatArticleAndPlatform, 0)
|
|
|
defer func() {
|
|
|
if err != nil {
|
|
@@ -158,7 +158,7 @@ func WechatArticleEsSearch(keywordStr string, wechatPlatformId, from, size int,
|
|
|
|
|
|
query := elastic.NewBoolQuery()
|
|
|
|
|
|
- if wechatPlatformId >= 0 {
|
|
|
+ if wechatPlatformId > 0 {
|
|
|
query = query.Must(elastic.NewTermQuery("WechatPlatformId", wechatPlatformId))
|
|
|
}
|
|
|
|