Subversion Repositories SmartDukaan

Rev

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

Rev 30262 Rev 30267
Line 33... Line 33...
33
			mandatoryQ.add(String.format("+(%s)", "*" + queryTerm + "*"));
33
			mandatoryQ.add(String.format("+(%s)", "*" + queryTerm + "*"));
34
		} else {
34
		} else {
35
			queryTerm = null;
35
			queryTerm = null;
36
		}
36
		}
37
		params.put("q", StringUtils.join(mandatoryQ, " "));
37
		params.put("q", StringUtils.join(mandatoryQ, " "));
38
		if (categoryIds.size() > 0) {
38
		if (categoryIds != null && categoryIds.size() > 0) {
39
			params.put("q", params.get("q") + " +filter(categoryId_i:(" + StringUtils.join(categoryIds, " ") + "))");
39
			params.put("q", params.get("q") + " +filter(categoryId_i:(" + StringUtils.join(categoryIds, " ") + "))");
40
		}
40
		}
41
		if (brands.size() > 0) {
41
		if (brands.size() > 0) {
42
			params.put("q", params.get("q") + " AND brand_ss:(" + StringUtils.join(brands, " ") + ")");
42
			params.put("q", params.get("q") + " AND brand_ss:(" + StringUtils.join(brands, " ") + ")");
43
		}
43
		}