wangshan 5 lat temu
rodzic
commit
acf1498857

+ 1 - 1
src/jfw/front/supsearch.go

@@ -247,7 +247,7 @@ func (p *Pcsearch) PcSearchIndex() error {
 			listSize = len(*list)
 		}
 		//所有的再次分词查询 只查标题
-		if len([]rune(s_word)) > 3 && int(count) < pc_pageSize && selectType == "title" {
+		if len([]rune(s_word)) > 3 && int(count) < pc_pageSize {
 			secondKWS = jy.HttpEs(s_word, "ik_smart", config.Sysconfig["elasticsearch"].(string))
 			findfields := `"title"`
 			qstr := getSearchQuery(secondKWS, industry, minprice, maxprice, findfields, getBidSearchQuery(area, publishtime, subtype))

+ 2 - 2
src/jfw/front/swordfish.go

@@ -492,7 +492,7 @@ func (m *Front) PcAjaxReq() {
 				if list != nil {
 					listSize = len(*list)
 				}
-				if len([]rune(s_word)) > 3 && int(count) < pc_pageSize && start == 0 && selectType == "title" {
+				if len([]rune(s_word)) > 3 && int(count) < pc_pageSize && start == 0 {
 					secondKWS = jy.HttpEs(s_word, "ik_smart", config.Sysconfig["elasticsearch"].(string))
 					findfields := `"title"`
 					qstr := getSearchQuery(secondKWS, industry, minprice, maxprice, findfields, getBidSearchQuery(area, publishtime, subtype))
@@ -859,7 +859,7 @@ func (m *Front) WxsearchlistPaging() {
 				if list != nil {
 					listSize = len(*list)
 				}
-				if len([]rune(s_word)) > 3 && listSize < pc_pageSize && pageNum == 1 && selectType == "title" {
+				if len([]rune(s_word)) > 3 && listSize < pc_pageSize && pageNum == 1 {
 					secondKWS = jy.HttpEs(s_word, "ik_smart", config.Sysconfig["elasticsearch"].(string))
 					findfields := `"title"`
 					qstr := getSearchQuery(secondKWS, industry, minprice, maxprice, findfields, getBidSearchQuery(scope, publishtime, subtype))

+ 1 - 1
src/jfw/modules/app/src/app/front/swordfish.go

@@ -468,7 +468,7 @@ func (m *Front) WxsearchlistPaging() {
 				if list != nil {
 					listSize = len(*list)
 				}
-				if len([]rune(s_word)) > 3 && listSize < wx_pageSize && pageNum == 1 && selectType == "title" {
+				if len([]rune(s_word)) > 3 && listSize < wx_pageSize && pageNum == 1 {
 					secondKWS = jy.HttpEs(searchvalue, "ik_smart", config.Sysconfig["elasticsearch"].(string))
 					findfields := `"title"`
 					qstr := getSearchQuery(secondKWS, industry, minprice, maxprice, findfields, getBidSearchQuery(scope, publishtime, subtype))

+ 3 - 3
src/jfw/public/search.go

@@ -272,7 +272,7 @@ func GetDataExportSearchCountUseId(_id string) (count int) {
 	count = int(elastic.Count(INDEX, TYPE, qstr))
 	//超级搜索一致的检索(防止数据导出和超级搜索数据量不一致)
 	//if scd.Comeinfrom == "supersearchPage" || scd.Comeinfrom == "exportPage" {
-	if len(scd.Keyword) != 0 && scd.SelectType == "title" {
+	if len(scd.Keyword) != 0 {
 		searchTextSize := 0
 		if len(scd.Keyword) > 0 {
 			searchTextSize = len([]rune(scd.Keyword[0].Keyword))
@@ -357,7 +357,7 @@ func GetDataExportSearchResultUseId(_id, dataType string, count int) *[]map[stri
 			if len(scd.Keyword) > 0 {
 				searchTextSize = len([]rune(scd.Keyword[0].Keyword))
 			}
-			if searchTextSize > 3 && count < 50 && scd.SelectType == "title" {
+			if searchTextSize > 3 && count < 50 {
 				var res *[]map[string]interface{}
 				if count > 0 {
 					res = doSearch(qstr, 0, count, "")
@@ -409,7 +409,7 @@ func GetDataExportSearchResultUseId(_id, dataType string, count int) *[]map[stri
 			if len(scd.Keyword) > 0 {
 				searchTextSize = len([]rune(scd.Keyword[0].Keyword))
 			}
-			if searchTextSize > 3 && num < 50 && scd.SelectType == "title" {
+			if searchTextSize > 3 && num < 50 {
 				secondKWS := jy.HttpEs(scd.Keyword[0].Keyword, "ik_smart", config.Sysconfig["elasticsearch"].(string))
 				scd.Keyword[0].Keyword = secondKWS
 				qstr = getDataExportSql(scd)