Subversion Repositories SmartDukaan

Rev

Rev 28221 | Rev 30080 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 28221 Rev 28653
Line 53... Line 53...
53
		params.put("start", String.valueOf(0));
53
		params.put("start", String.valueOf(0));
54
		if (limit == 0) {
54
		if (limit == 0) {
55
			params.put("fl", "catalogId_i, title_s");
55
			params.put("fl", "catalogId_i, title_s");
56
			params.put("rows", String.valueOf(5000));
56
			params.put("rows", String.valueOf(5000));
57
		} else {
57
		} else {
58
			params.put("rows", String.valueOf(20));
58
			params.put("rows", String.valueOf(limit));
59
		}
59
		}
60
		params.put("wt", "json");
60
		params.put("wt", "json");
61
		String response = null;
61
		String response = null;
62
		try {
62
		try {
63
			response = restClient.get(SchemeType.HTTP, solrUrl, 8984, "solr/demo/select", params);
63
			response = restClient.get(SchemeType.HTTP, solrUrl, 8984, "solr/demo/select", params);
Line 90... Line 90...
90
			documentMap.put(doc.getInt("catalogId_i"), doc);
90
			documentMap.put(doc.getInt("catalogId_i"), doc);
91
		}
91
		}
92
		return documentMap;
92
		return documentMap;
93
	}
93
	}
94
 
94
 
95
	// This method is the used to pull docs based on search nad shall be used
95
	// This method is the used to pull docs based on search and shall be used
96
	// interchangably for both the things
96
	// interchangably for both the things
97
	public JSONArray getSolrDocs(String queryTerm, String categoryId, String offset, String limit, String sort,
97
	public JSONArray getSolrDocs(String queryTerm, String categoryId, String offset, String limit, String sort,
98
			String brand, int subCategoryId, boolean hotDeal) throws Throwable {
98
			String brand, int subCategoryId, boolean hotDeal) throws Throwable {
99
		List<String> parentFilter = new ArrayList<>();
99
		List<String> parentFilter = new ArrayList<>();
100
		parentFilter.add("categoryId_i:" + categoryId);
100
		parentFilter.add("categoryId_i:" + categoryId);