|
@@ -151,7 +151,7 @@ func getesResp(ques, analyzer string, addrs []string) (resp *http.Response, err
|
|
|
const (
|
|
|
INDEX = "bidding"
|
|
|
TYPE = "bidding"
|
|
|
- bidSearch_sort = `{"_score":-1,"publishtime":-1}`
|
|
|
+ bidSearch_sort = `{"dataweight":-1,"publishtime":-1}`
|
|
|
RedisName = "other"
|
|
|
//招标搜索分页--每页显示数量
|
|
|
SearchPageSize = 50
|
|
@@ -346,8 +346,8 @@ func DetailFileORTitle(findfields string) bool {
|
|
|
}
|
|
|
func GetSearchQuery(in *bxcore.SearchReq, mustquery string) (qstr string) {
|
|
|
multi_match := `{"multi_match": {"query": "%s","type": "phrase", "fields": [%s]}}`
|
|
|
- //query := `{"query":{"bool":{"must":[%s],"must_not":[%s]}}}`
|
|
|
- query := `{"query": {"function_score": {"query": {"bool": {"must": [%s],"must_not": [%s]}},"field_value_factor": {"field": "dataweight","modifier": "ln1p","missing": 0}}}}`
|
|
|
+ query := `{"query":{"bool":{"must":[%s],"must_not":[%s]}}}`
|
|
|
+ //query := `{"query": {"function_score": {"query": {"bool": {"must": [%s],"must_not": [%s]}},"field_value_factor": {"field": "dataweight","modifier": "ln1p","missing": 0}}}}`
|
|
|
|
|
|
query_bool_should := `{"bool":{"should":[%s],"minimum_should_match": 1}}`
|
|
|
query_bools_must := `{"bool":{"must":[{"range":{"bidamount":{%s}}}]}},{"bool":{"must":[{"range":{"budget":{%s}}}],"must_not":[{"range":{"bidamount":{"gte":-1}}}]}}`
|