| Line 151... |
Line 151... |
| 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 |
|
155 |
|
| 156 |
mandatoryQ.add(String.format("+{!parent which=\"brand_s=%s\"} tagId_i:(%s)", brand, tagIds));
|
156 |
mandatoryQ.add(String.format("+{!parent which=\"brand_s=%s\"} tagId_i:(%s)", brand, StringUtils.join(tagIds, " ")));
|
| 157 |
} else {
|
157 |
} else {
|
| 158 |
mandatoryQ.add(String.format("+{!parent which=\"id:catalog*\"} tagId_i:(%s)", StringUtils.join(tagIds, " ")));
|
158 |
mandatoryQ.add(String.format("+{!parent which=\"id:catalog*\"} tagId_i:(%s)", StringUtils.join(tagIds, " ")));
|
| 159 |
}
|
159 |
}
|
| 160 |
params.put("q", StringUtils.join(mandatoryQ," "));
|
160 |
params.put("q", StringUtils.join(mandatoryQ," "));
|
| 161 |
params.put("fl", "*, [child parentFilter=id:catalog*]");
|
161 |
params.put("fl", "*, [child parentFilter=id:catalog*]");
|