|
@@ -17,12 +17,12 @@ import (
|
|
const (
|
|
const (
|
|
search_index = "bidding"
|
|
search_index = "bidding"
|
|
search_type = "bidding"
|
|
search_type = "bidding"
|
|
- mongodb_fields = `{"_id":1,"area":1,"publishtime":1,"s_subscopeclass":1,"subtype":1,"title":1,"toptype":1,"type":1, "buyerclass":1,"budget":1,"bidamount":1,"s_winner":1,"bidopentime":1,"buyer":1,"projectname":1}`
|
|
|
|
- query = `{"query":{"terms":{"_id":["%s"]}},"_source":["_id","area", "publishtime", "s_subscopeclass", "subtype", "title", "toptype", "type", "buyerclass","bidamount","budget","projectname","buyer","bidopentime","s_winner","filetext"],"from":0,"size":%d}`
|
|
|
|
|
|
+ mongodb_fields = `{"_id":1,"area":1,"publishtime":1,"s_subscopeclass":1,"subtype":1,"title":1,"toptype":1,"type":1, "buyerclass":1,"budget":1,"bidamount":1,"s_winner":1,"bidopentime":1,"buyer":1,"projectname":1,"spidercode":1,"site":1}`
|
|
|
|
+ query = `{"query":{"terms":{"_id":["%s"]}},"_source":["_id","area", "publishtime", "s_subscopeclass", "subtype", "title", "toptype", "type", "buyerclass","bidamount","budget","projectname","buyer","bidopentime","s_winner","filetext","spidercode","site"],"from":0,"size":%d}`
|
|
multi_match = `{"multi_match": {"query": %s,"type": "phrase", "fields": ["title"]}}`
|
|
multi_match = `{"multi_match": {"query": %s,"type": "phrase", "fields": ["title"]}}`
|
|
query_bool_must = `{"terms":{"%s":[%s]}}`
|
|
query_bool_must = `{"terms":{"%s":[%s]}}`
|
|
query_bool_must_and = `{"bool":{"must":[%s],"must_not":[%s]}}`
|
|
query_bool_must_and = `{"bool":{"must":[%s],"must_not":[%s]}}`
|
|
- search_field = `"_id","area", "publishtime", "s_subscopeclass", "subtype", "title", "toptype", "type", "buyerclass","bidamount","budget","projectname","buyer","bidopentime","s_winner","filetext"`
|
|
|
|
|
|
+ search_field = `"_id","area", "publishtime", "s_subscopeclass", "subtype", "title", "toptype", "type", "buyerclass","bidamount","budget","projectname","buyer","bidopentime","s_winner","filetext","spidercode","site"`
|
|
query_city_hkeys = `{"query":{"bool":{"must":[%s],"should":[%s],"minimum_should_match": 1}},"highlight": {"pre_tags": ["<a>"],"post_tags": ["</a>"],"fields": {"title": {"fragment_size": 0,"number_of_fragments": 1}}},"_source":[` + search_field + `],"sort":[{"publishtime":"desc"},{"budget":"desc"}],"from":0,"size":20}`
|
|
query_city_hkeys = `{"query":{"bool":{"must":[%s],"should":[%s],"minimum_should_match": 1}},"highlight": {"pre_tags": ["<a>"],"post_tags": ["</a>"],"fields": {"title": {"fragment_size": 0,"number_of_fragments": 1}}},"_source":[` + search_field + `],"sort":[{"publishtime":"desc"},{"budget":"desc"}],"from":0,"size":20}`
|
|
)
|
|
)
|
|
|
|
|