wangchuanjin 9 éve
szülő
commit
406e701559
1 módosított fájl, 11 hozzáadás és 2 törlés
  1. 11 2
      core/src/qfw/search/searchService.go

+ 11 - 2
core/src/qfw/search/searchService.go

@@ -342,9 +342,18 @@ func searhWebContentent(querymap map[string]string, n *Search, reqType string) (
 						}
 					}
 
-					//str += `{"prefix":{"OpLocDistrict":"` + ipcity + `"}}`
 					tempBisOne = true
 					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": {
 						      "script_score": {
 						        "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,
 						"size":` + fmt.Sprintf("%v", perPage) + `,
 						  "sort": [{"_score": "desc"},{"OpSint":"desc"},{"RegCap":"desc"}]
-						}`
+						}`*/
 				}
 			}
 		}