Subversion Repositories SmartDukaan

Rev

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

Rev 31580 Rev 31581
Line 577... Line 577...
577
		Map<String, String> params = new HashMap<>();
577
		Map<String, String> params = new HashMap<>();
578
		List<String> mandatoryQ = new ArrayList<>();
578
		List<String> mandatoryQ = new ArrayList<>();
579
 
579
 
580
		if (webListing.getType().equals(WebListingType.solr)) {
580
		if (webListing.getType().equals(WebListingType.solr)) {
581
			logger.info("solrtype {}", webListing.getSolrQuery());
581
			logger.info("solrtype {}", webListing.getSolrQuery());
582
			mandatoryQ.add(String.format("+{!parent which=\"" + webListing.getSolrQuery() + "\"}active_b:true"));
582
			mandatoryQ.add(String.format("+{!parent which=\"" + webListing.getSolrQuery() + "\"},active_b:true"));
583
 
583
 
584
		} else {
584
		} else {
585
			logger.info("solrtype2 {}", webListing.getSolrQuery());
585
			logger.info("solrtype2 {}", webListing.getSolrQuery());
586
 
586
 
587
			List<Integer> webProducts = webProductListingRepository
587
			List<Integer> webProducts = webProductListingRepository
Line 590... Line 590...
590
			if (webProducts.size() == 0) {
590
			if (webProducts.size() == 0) {
591
				return new ArrayList<>();
591
				return new ArrayList<>();
592
			}
592
			}
593
 
593
 
594
			mandatoryQ.add(String.format(
594
			mandatoryQ.add(String.format(
595
					"+{!parent which=\"catalogId_i:" + StringUtils.join(webProducts, " ") + "\"} tagId_i:(%s)",
595
					"+{!parent which=\"catalogId_i:" + StringUtils.join(webProducts, " ") + "\"} ,active_b:true"));
596
					StringUtils.join(TAG_IDS, " ")));
-
 
597
 
596
 
598
		}
597
		}
599
		params.put("q", StringUtils.join(mandatoryQ, " "));
598
		params.put("q", StringUtils.join(mandatoryQ, " "));
600
		params.put("fl", "*, [child parentFilter=id:catalog*]");
599
		params.put("fl", "*, [child parentFilter=id:catalog* childFilter=active_b:true ]");
601
		// params.put("sort", "create_s desc");
600
		// params.put("sort", "create_s desc");
602
		params.put("start", String.valueOf(offset));
601
		params.put("start", String.valueOf(offset));
603
		params.put("rows", String.valueOf(limit));
602
		params.put("rows", String.valueOf(limit));
604
		params.put("wt", "json");
603
		params.put("wt", "json");
605
		String response = null;
604
		String response = null;