|
@@ -111,18 +111,18 @@ func EsComprehensiveSearch(keyWord string, startSize, pageSize int) (result []*S
|
|
|
},
|
|
|
})
|
|
|
|
|
|
- shouldMapquery = append(shouldMapquery, map[string]interface{}{
|
|
|
- "function_score": map[string]interface{}{
|
|
|
- "query": map[string]interface{}{
|
|
|
- "multi_match": map[string]interface{}{
|
|
|
- //"boost": (lenkeyWordArr-k)*boost - 1, //给查询的值赋予权重
|
|
|
- "boost": boost, //给查询的值赋予权重
|
|
|
- "fields": []interface{}{"BodyText"},
|
|
|
- "query": v,
|
|
|
- },
|
|
|
- },
|
|
|
- },
|
|
|
- })
|
|
|
+ //shouldMapquery = append(shouldMapquery, map[string]interface{}{
|
|
|
+ // "function_score": map[string]interface{}{
|
|
|
+ // "query": map[string]interface{}{
|
|
|
+ // "multi_match": map[string]interface{}{
|
|
|
+ // //"boost": (lenkeyWordArr-k)*boost - 1, //给查询的值赋予权重
|
|
|
+ // "boost": boost, //给查询的值赋予权重
|
|
|
+ // "fields": []interface{}{"BodyText"},
|
|
|
+ // "query": v,
|
|
|
+ // },
|
|
|
+ // },
|
|
|
+ // },
|
|
|
+ //})
|
|
|
|
|
|
shouldMapquery = append(shouldMapquery, map[string]interface{}{
|
|
|
"function_score": map[string]interface{}{
|
|
@@ -176,7 +176,7 @@ func EsComprehensiveSearch(keyWord string, startSize, pageSize int) (result []*S
|
|
|
highlightMap := make(map[string]interface{}, 0)
|
|
|
highlightMap = map[string]interface{}{
|
|
|
"fields": map[string]interface{}{
|
|
|
- "BodyText": map[string]interface{}{},
|
|
|
+ //"BodyText": map[string]interface{}{},
|
|
|
"Title": map[string]interface{}{},
|
|
|
"Abstract": map[string]interface{}{},
|
|
|
"Annotation": map[string]interface{}{},
|