Subversion Repositories SmartDukaan

Rev

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

Rev 31712 Rev 31713
Line 46... Line 46...
46
		params.put("q", StringUtils.join(mandatoryQ, " "));
46
		params.put("q", StringUtils.join(mandatoryQ, " "));
47
		if (categoryIds != null && categoryIds.size() > 0) {
47
		if (categoryIds != null && categoryIds.size() > 0) {
48
			params.put("q", params.get("q") + " +filter(categoryId_i:(" + StringUtils.join(categoryIds, " ") + "))");
48
			params.put("q", params.get("q") + " +filter(categoryId_i:(" + StringUtils.join(categoryIds, " ") + "))");
49
		}
49
		}
50
		if (brands.size() > 0) {
50
		if (brands.size() > 0) {
51
			brands = brands.stream().map(x -> x.replaceAll(" ", "\\ ")).collect(Collectors.toList());
51
			brands = brands.stream().map(x -> x.replaceAll("\\s", "\\ ")).collect(Collectors.toList());
52
			params.put("q", params.get("q") + " AND brand_ss:(" + StringUtils.join(brands, " ") + ")");
52
			params.put("q", params.get("q") + " AND brand_ss:(" + StringUtils.join(brands, " ") + ")");
53
		}
53
		}
54
		if (activeOnly) {
54
		if (activeOnly) {
55
			params.put("q", params.get("q") + " AND active_b:true");
55
			params.put("q", params.get("q") + " AND active_b:true");
56
		}
56
		}