diff --git a/pom.xml b/pom.xml
index 217acd7..2d388c3 100644
--- a/pom.xml
+++ b/pom.xml
@@ -5,7 +5,7 @@
com.visenze
visearch-java-sdk
ViSearch Java SDK
- 1.14.1
+ 1.14.2
jar
https://github.com/visenze/visearch-sdk-java
ViSearch Java SDK
diff --git a/src/main/java/com/visenze/productsearch/ProductSearchResponse.java b/src/main/java/com/visenze/productsearch/ProductSearchResponse.java
index af6d4ca..2af7f15 100644
--- a/src/main/java/com/visenze/productsearch/ProductSearchResponse.java
+++ b/src/main/java/com/visenze/productsearch/ProductSearchResponse.java
@@ -119,6 +119,12 @@ public class ProductSearchResponse extends BaseProductSearchResponse {
@JsonProperty("excluded_pids")
private List excludedPids;
+ @JsonProperty("hidden_categories")
+ private List hiddenCategories;
+
+ @JsonProperty("pin_category_pid_map")
+ private Map pinCategoryPidMap;
+
@JsonProperty("set_info")
private List setInfoList;
@@ -259,6 +265,22 @@ public void setExcludedPids(List excludedPids) {
this.excludedPids = excludedPids;
}
+ public List getHiddenCategories() {
+ return hiddenCategories;
+ }
+
+ public void setHiddenCategories(List hiddenCategories) {
+ this.hiddenCategories = hiddenCategories;
+ }
+
+ public Map getPinCategoryPidMap() {
+ return pinCategoryPidMap;
+ }
+
+ public void setPinCategoryPidMap(Map pinCategoryPidMap) {
+ this.pinCategoryPidMap = pinCategoryPidMap;
+ }
+
public List getSetInfoList() {
return setInfoList;
}
diff --git a/src/main/java/com/visenze/visearch/PagedSearchResult.java b/src/main/java/com/visenze/visearch/PagedSearchResult.java
index 24df72a..eee1544 100644
--- a/src/main/java/com/visenze/visearch/PagedSearchResult.java
+++ b/src/main/java/com/visenze/visearch/PagedSearchResult.java
@@ -38,6 +38,10 @@ public class PagedSearchResult extends PagedResult {
private List excludedImNames;
+ private List hiddenCategories;
+
+ private Map pinCategoryPidMap;
+
private List setInfoList;
private String reqId;
@@ -175,6 +179,22 @@ public void setExcludedImNames(List excludedImNames) {
this.excludedImNames = excludedImNames;
}
+ public List getHiddenCategories() {
+ return hiddenCategories;
+ }
+
+ public void setHiddenCategories(List hiddenCategories) {
+ this.hiddenCategories = hiddenCategories;
+ }
+
+ public Map getPinCategoryPidMap() {
+ return pinCategoryPidMap;
+ }
+
+ public void setPinCategoryPidMap(Map pinCategoryPidMap) {
+ this.pinCategoryPidMap = pinCategoryPidMap;
+ }
+
public List getSetInfoList() {
return setInfoList;
}
diff --git a/src/main/java/com/visenze/visearch/internal/SearchOperationsImpl.java b/src/main/java/com/visenze/visearch/internal/SearchOperationsImpl.java
index 03c3e24..11f9af0 100644
--- a/src/main/java/com/visenze/visearch/internal/SearchOperationsImpl.java
+++ b/src/main/java/com/visenze/visearch/internal/SearchOperationsImpl.java
@@ -349,6 +349,18 @@ private PagedSearchResult getPagedResult(ViSearchHttpResponse httpResponse) {
result.setExcludedImNames(excludedImNames);
}
+ JsonNode hiddenCategoriesNode = node.get(ViSearchHttpConstants.HIDDEN_CATEGORIES);
+ if (hiddenCategoriesNode != null) {
+ List hiddenCategories = deserializeListResult(response, hiddenCategoriesNode, String.class);
+ result.setHiddenCategories(hiddenCategories);
+ }
+
+ JsonNode pinCategoryPidMapNode = node.get(ViSearchHttpConstants.PIN_CATEGORY_PID_MAP);
+ if (pinCategoryPidMapNode != null) {
+ Map pinCategoryPidMap = deserializeMapResult(response, pinCategoryPidMapNode, String.class, String.class);
+ result.setPinCategoryPidMap(pinCategoryPidMap);
+ }
+
JsonNode setInfoListNode = node.get(ViSearchHttpConstants.SET_INFO);
if (setInfoListNode != null) {
List setInfoList = deserializeListResult(response, setInfoListNode, SetInfo.class);
diff --git a/src/main/java/com/visenze/visearch/internal/constant/ViSearchHttpConstants.java b/src/main/java/com/visenze/visearch/internal/constant/ViSearchHttpConstants.java
index 5973a53..321bfee 100644
--- a/src/main/java/com/visenze/visearch/internal/constant/ViSearchHttpConstants.java
+++ b/src/main/java/com/visenze/visearch/internal/constant/ViSearchHttpConstants.java
@@ -119,6 +119,10 @@ public abstract class ViSearchHttpConstants {
public static final String SHOW_EXCLUDED_PIDS = "show_excluded_pids";
public static final String SHOW_PINNED_PIDS = "show_pinned_pids";
public static final String EXCLUDED_IM_NAMES = "excluded_im_names";
+ public static final String HIDDEN_CATEGORIES = "hidden_categories";
+
+ public static final String PIN_CATEGORY_PID_MAP = "pin_category_pid_map";
+
public static final String USE_SET_BASED_CTL = "use_set_based_ctl";
public static final String SET_LIMIT = "set_limit";
diff --git a/src/test/java/com/visenze/visearch/ViSearchSearchOperationsTest.java b/src/test/java/com/visenze/visearch/ViSearchSearchOperationsTest.java
index 293218e..796722d 100644
--- a/src/test/java/com/visenze/visearch/ViSearchSearchOperationsTest.java
+++ b/src/test/java/com/visenze/visearch/ViSearchSearchOperationsTest.java
@@ -1361,6 +1361,11 @@ public void testRecommendationResponsePinExcludedParsing() {
" }\n" +
" ],\n" +
" \"excluded_im_names\" : [\"im1\", \"im2\"],\n" +
+ " \"hidden_categories\" : [\"top\", \"shoe\"],\n" +
+ " \"pin_category_pid_map\": {\n" +
+ " \"top\": \"top1\",\n" +
+ " \"shoe\": \"shoe2\"\n" +
+ " },\n" +
" \"reqid\": \"1317439821672620035\"\n" +
"}";
when(response.getBody()).thenReturn(responseBody);
@@ -1396,6 +1401,14 @@ public void testRecommendationResponsePinExcludedParsing() {
assertEquals("im1" , result.getExcludedImNames().get(0));
assertEquals("im2" , result.getExcludedImNames().get(1));
+ assertEquals(2, result.getHiddenCategories().size());
+ assertEquals("top" , result.getHiddenCategories().get(0));
+ assertEquals("shoe" , result.getHiddenCategories().get(1));
+
+ assertEquals(2, result.getPinCategoryPidMap().size());
+ assertEquals("top1", result.getPinCategoryPidMap().get("top"));
+ assertEquals("shoe2", result.getPinCategoryPidMap().get("shoe"));
+
}