|
@@ -342,9 +342,18 @@ func searhWebContentent(querymap map[string]string, n *Search, reqType string) (
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
- //str += `{"prefix":{"OpLocDistrict":"` + ipcity + `"}}`
|
|
|
|
tempBisOne = true
|
|
tempBisOne = true
|
|
query = `{"query": {
|
|
query = `{"query": {
|
|
|
|
+ "bool": {
|
|
|
|
+ "must":[{"prefix":{"OpLocDistrict":"` + ipcity + `"}}]
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ ,"_source":["_id","EntName","RegOrgName","RegNo","EntType","LeRep","EstDate","OpLocDistrictName","RegCap","OpStateName","OpState","s_servicenames","s_action","OpLocDistrict","s_submitid","RegCapCurName","s_avatar","excDirect"]
|
|
|
|
+ ,"from":0,
|
|
|
|
+ "size":` + fmt.Sprintf("%v", perPage) + `,
|
|
|
|
+ "sort": [{"_score": "desc"},{"OpSint":"desc"},{"RegCap":"desc"}]
|
|
|
|
+ }`
|
|
|
|
+ /*query = `{"query": {
|
|
"function_score": {
|
|
"function_score": {
|
|
"script_score": {
|
|
"script_score": {
|
|
"script": "if(doc['OpLocDistrict'].value&&doc['OpLocDistrict'].value.substring(0,2)=='` + ipcity + `') return 1 else return 0"
|
|
"script": "if(doc['OpLocDistrict'].value&&doc['OpLocDistrict'].value.substring(0,2)=='` + ipcity + `') return 1 else return 0"
|
|
@@ -355,7 +364,7 @@ func searhWebContentent(querymap map[string]string, n *Search, reqType string) (
|
|
,"from":0,
|
|
,"from":0,
|
|
"size":` + fmt.Sprintf("%v", perPage) + `,
|
|
"size":` + fmt.Sprintf("%v", perPage) + `,
|
|
"sort": [{"_score": "desc"},{"OpSint":"desc"},{"RegCap":"desc"}]
|
|
"sort": [{"_score": "desc"},{"OpSint":"desc"},{"RegCap":"desc"}]
|
|
- }`
|
|
|
|
|
|
+ }`*/
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|