| Line 150... |
Line 150... |
| 150 |
List<Integer> tagIds = pricingService.getTagsIdsByRetailerId(userInfo.getUserId());
|
150 |
List<Integer> tagIds = pricingService.getTagsIdsByRetailerId(userInfo.getUserId());
|
| 151 |
RestClient rc = new RestClient(SchemeType.HTTP, "dtr", 8984);
|
151 |
RestClient rc = new RestClient(SchemeType.HTTP, "dtr", 8984);
|
| 152 |
Map<String, String> params = new HashMap<>();
|
152 |
Map<String, String> params = new HashMap<>();
|
| 153 |
List<String> mandatoryQ = new ArrayList<>();
|
153 |
List<String> mandatoryQ = new ArrayList<>();
|
| 154 |
if(brand != null) {
|
154 |
if(brand != null) {
|
| 155 |
mandatoryQ.add(String.format("brands_s:(%s)", brand));
|
155 |
mandatoryQ.add(String.format("brand_s:(%s)", brand));
|
| 156 |
}
|
156 |
}
|
| 157 |
mandatoryQ.add(String.format("{!parent which=\"id:catalog*\"}tagId_i:(%s)", StringUtils.join(tagIds, " OR ")));
|
157 |
mandatoryQ.add(String.format("{!parent which=\"id:catalog*\"}tagId_i:(%s)", StringUtils.join(tagIds, " OR ")));
|
| 158 |
params.put("q", StringUtils.join(mandatoryQ," +"));
|
158 |
params.put("q", StringUtils.join(mandatoryQ," +"));
|
| 159 |
params.put("fl", "*, [child parentFilter=id:catalog*]");
|
159 |
params.put("fl", "*, [child parentFilter=id:catalog*]");
|
| 160 |
params.put("sort", "rank_i asc");
|
160 |
params.put("sort", "rank_i asc");
|