|
@@ -199,6 +199,13 @@ func (req *ESQueryRequest) parseJsonQuery() (queryMap map[string]interface{}) {
|
|
|
req.Column: req.Key,
|
|
|
},
|
|
|
},
|
|
|
+ "highlight": map[string]interface{}{
|
|
|
+ "fields": map[string]interface{}{
|
|
|
+ req.Column: map[string]interface{}{},
|
|
|
+ },
|
|
|
+ "pre_tags": []string{"<span style='color:#0078E8'>"},
|
|
|
+ "post_tags": []string{"</span>"},
|
|
|
+ },
|
|
|
}
|
|
|
return
|
|
|
case MatchAllByCondition:
|
|
@@ -219,6 +226,13 @@ func (req *ESQueryRequest) parseJsonQuery() (queryMap map[string]interface{}) {
|
|
|
},
|
|
|
},
|
|
|
},
|
|
|
+ "highlight": map[string]interface{}{
|
|
|
+ "fields": map[string]interface{}{
|
|
|
+ req.Column: map[string]interface{}{},
|
|
|
+ },
|
|
|
+ "pre_tags": []string{"<span style='color:#0078E8'>"},
|
|
|
+ "post_tags": []string{"</span>"},
|
|
|
+ },
|
|
|
}
|
|
|
return
|
|
|
case Match:
|
|
@@ -248,7 +262,7 @@ func (req *ESQueryRequest) parseJsonQuery() (queryMap map[string]interface{}) {
|
|
|
"fields": map[string]interface{}{
|
|
|
req.Column: map[string]interface{}{},
|
|
|
},
|
|
|
- "pre_tags": []string{"<span style='color:red'>"},
|
|
|
+ "pre_tags": []string{"<span style='color:#0078E8'>"},
|
|
|
"post_tags": []string{"</span>"},
|
|
|
},
|
|
|
"post_filter": map[string]interface{}{
|
|
@@ -272,7 +286,7 @@ func (req *ESQueryRequest) parseJsonQuery() (queryMap map[string]interface{}) {
|
|
|
"fields": map[string]interface{}{
|
|
|
req.Column: map[string]interface{}{},
|
|
|
},
|
|
|
- "pre_tags": []string{"<span style='color:red'>"},
|
|
|
+ "pre_tags": []string{"<span style='color:#0078E8'>"},
|
|
|
"post_tags": []string{"</span>"},
|
|
|
},
|
|
|
"post_filter": map[string]interface{}{
|