| Line 463... |
Line 463... |
| 463 |
params.put("fl", "*, [child parentFilter=id:catalog*]");
|
463 |
params.put("fl", "*, [child parentFilter=id:catalog*]");
|
| 464 |
params.put("sort", "rank_i asc, create_s desc");
|
464 |
params.put("sort", "rank_i asc, create_s desc");
|
| 465 |
params.put("wt", "json");
|
465 |
params.put("wt", "json");
|
| 466 |
String response = null;
|
466 |
String response = null;
|
| 467 |
try {
|
467 |
try {
|
| 468 |
response = rc.get(SchemeType.HTTP, "50.116.10.120", 8984, "solr/demo/select", params);
|
468 |
response = rc.get(SchemeType.HTTP, solrUrl, 8984, "solr/demo/select", params);
|
| 469 |
} catch (HttpHostConnectException e) {
|
469 |
} catch (HttpHostConnectException e) {
|
| 470 |
throw new ProfitMandiBusinessException("", "", "Could not connect to host");
|
470 |
throw new ProfitMandiBusinessException("", "", "Could not connect to host");
|
| 471 |
}
|
471 |
}
|
| 472 |
JSONObject solrResponseJSONObj = new JSONObject(response).getJSONObject("response");
|
472 |
JSONObject solrResponseJSONObj = new JSONObject(response).getJSONObject("response");
|
| 473 |
JSONArray docs = solrResponseJSONObj.getJSONArray("docs");
|
473 |
JSONArray docs = solrResponseJSONObj.getJSONArray("docs");
|
| Line 515... |
Line 515... |
| 515 |
params.put("wt", "json");
|
515 |
params.put("wt", "json");
|
| 516 |
params.put("rows", "50");
|
516 |
params.put("rows", "50");
|
| 517 |
params.put("fl", "subCategoryId_i");
|
517 |
params.put("fl", "subCategoryId_i");
|
| 518 |
String response = null;
|
518 |
String response = null;
|
| 519 |
try {
|
519 |
try {
|
| 520 |
response = rc.get(SchemeType.HTTP, "50.116.10.120", 8984, "solr/demo/select", params);
|
520 |
response = rc.get(SchemeType.HTTP, solrUrl, 8984, "solr/demo/select", params);
|
| 521 |
} catch (HttpHostConnectException e) {
|
521 |
} catch (HttpHostConnectException e) {
|
| 522 |
throw new ProfitMandiBusinessException("", "", "Could not connect to host");
|
522 |
throw new ProfitMandiBusinessException("", "", "Could not connect to host");
|
| 523 |
}
|
523 |
}
|
| 524 |
JSONObject solrResponseJSONObj = new JSONObject(response).getJSONObject("grouped");
|
524 |
JSONObject solrResponseJSONObj = new JSONObject(response).getJSONObject("grouped");
|
| 525 |
JSONArray groups = solrResponseJSONObj.getJSONObject("subCategoryId_i").getJSONArray("groups");
|
525 |
JSONArray groups = solrResponseJSONObj.getJSONObject("subCategoryId_i").getJSONArray("groups");
|