‘linchangsheng’ 5 tháng trước cách đây
mục cha
commit
bba6c7af9a

+ 1 - 1
mall-miniapp-service/src/main/java/com/gree/mall/miniapp/logic/es/EsLogic.java

@@ -54,7 +54,7 @@ public class EsLogic {
             must.must(QueryBuilders.matchPhraseQuery("workerNumber", workerNumber));
         }
         if(CollectionUtils.isNotEmpty(websitNumbers)){
-            must.must(QueryBuilders.termsQuery("websitNumber",websitNumbers));
+            must.must(QueryBuilders.termsQuery("websitNumber.keyword",websitNumbers));
         }
         NativeSearchQuery titleBuild = new NativeSearchQueryBuilder().withQuery(titleQueryBuilder).build();
         NativeSearchQuery dataBuild = new NativeSearchQueryBuilder().withQuery(must).build();

+ 1 - 1
mall-server-api/src/main/java/com/gree/mall/manager/logic/es/EsLogic.java

@@ -90,7 +90,7 @@ public class EsLogic {
             must.must(QueryBuilders.matchPhraseQuery("workerNumber", workerNumber));
         }
         if(CollectionUtils.isNotEmpty(websitNumbers)){
-            must.must(QueryBuilders.matchPhraseQuery("websitNumber",websitNumbers));
+            must.must(QueryBuilders.termsQuery("websitNumber.keyword",websitNumbers));
         }
         NativeSearchQuery titleBuild = new NativeSearchQueryBuilder().withQuery(titleQueryBuilder).build();
         NativeSearchQuery dataBuild = new NativeSearchQueryBuilder().withQuery(must).build();