Browse Source

Merge branch 'dev2.6.1.1' into release

lianbingjie 6 years ago
parent
commit
6c711790f5
2 changed files with 4 additions and 4 deletions
  1. 2 2
      src/jfw/front/swordfish.go
  2. 2 2
      src/jfw/modules/app/src/jfw/front/swordfish.go

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

@@ -2820,7 +2820,7 @@ func getShouldQueryMap(findfield, searchvalue, industry string) []map[string]str
 }
 
 func getSearchQuery(keyword, industry, minprice, maxprice, findfields, mustquery string) (qstr string) {
-	multi_match := `{"multi_match": {"query": "%s","type": "phrase", "fields": [%s],"analyzer": "my_ngram"}}`
+	multi_match := `{"multi_match": {"query": "%s","type": "phrase", "fields": [%s]}}`
 	//match_phrase := `{"match_phrase": {"s_subscopeclass": "%s"}}`
 	query := `{"query":{"bool":{"must":[%s],"should":[%s],"minimum_should_match": %d}}}`
 	query_bool_should := `{"bool":{"should":[%s],"minimum_should_match": 1}}`
@@ -2879,7 +2879,7 @@ func getSearchQuery(keyword, industry, minprice, maxprice, findfields, mustquery
 func wxPushViewDatas(index, itype string, keys []elastic.KeyConfig, allquery, findfields, SortQuery, fields string, start, limit int) *[]map[string]interface{} {
 	query_all := `{"query":{"bool":{"must":[%s],"should":[%s],"minimum_should_match":1}}}`
 	match_detail := `{"match":{"detail":{"query":"%s","operator": "and"}}}`
-	minq := `{"multi_match": {"query": "%s","type": "phrase", "fields": [%s],"analyzer": "my_ngram"}}`
+	minq := `{"multi_match": {"query": "%s","type": "phrase", "fields": [%s]}}`
 	highlightStr := `%s: {"fragment_size": %d,"number_of_fragments": 1}`
 	query_bool := `{"bool":{"must":[%s],"should":[%s],"must_not":[%s],"minimum_should_match":1}}`
 	bool_must := `{"bool":{"must":[%s]}}`

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

@@ -383,7 +383,7 @@ func (f *Front) MyFeedbacks() error {
 }
 
 func getSearchQuery(keyword, industry, minprice, maxprice, findfields, mustquery string) (qstr string) {
-	multi_match := `{"multi_match": {"query": "%s","type": "phrase", "fields": [%s],"analyzer": "my_ngram"}}`
+	multi_match := `{"multi_match": {"query": "%s","type": "phrase", "fields": [%s]}}`
 	//match_phrase := `{"match_phrase": {"s_subscopeclass": "%s"}}`
 	query := `{"query":{"bool":{"must":[%s],"should":[%s],"minimum_should_match": %d}}}`
 	query_bool_should := `{"bool":{"should":[%s],"minimum_should_match": 1}}`
@@ -442,7 +442,7 @@ func getSearchQuery(keyword, industry, minprice, maxprice, findfields, mustquery
 func wxPushViewDatas(index, itype string, keys []elastic.KeyConfig, allquery, findfields, SortQuery, fields string, start, limit int) *[]map[string]interface{} {
 	query_all := `{"query":{"bool":{"must":[%s],"should":[%s],"minimum_should_match":1}}}`
 	match_detail := `{"match":{"detail":{"query":"%s","operator": "and"}}}`
-	minq := `{"multi_match": {"query": "%s","type": "phrase", "fields": [%s],"analyzer": "my_ngram"}}`
+	minq := `{"multi_match": {"query": "%s","type": "phrase", "fields": [%s]}}`
 	highlightStr := `%s: {"fragment_size": %d,"number_of_fragments": 1}`
 	query_bool := `{"bool":{"must":[%s],"should":[%s],"must_not":[%s],"minimum_should_match":1}}`
 	bool_must := `{"bool":{"must":[%s]}}`