Subversion Repositories SmartDukaan

Rev

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

Rev 31675 Rev 31676
Line 662... Line 662...
662
			logger.info("solrtype2 {}", webListing.getSolrQuery());
662
			logger.info("solrtype2 {}", webListing.getSolrQuery());
663
 
663
 
664
			webProducts = webProductListingRepository
664
			webProducts = webProductListingRepository
665
					.selectAllByWebListingId(webListing.getId(), Integer.parseInt(offset), Integer.parseInt(limit))
665
					.selectAllByWebListingId(webListing.getId(), Integer.parseInt(offset), Integer.parseInt(limit))
666
					.stream().filter(x -> x.getRank() > 0).map(x -> x.getEntityId()).collect(Collectors.toList());
666
					.stream().filter(x -> x.getRank() > 0).map(x -> x.getEntityId()).collect(Collectors.toList());
667
			params.put("hsncode_s", "85171300");
-
 
668
 
667
 
669
			if (webProducts.size() == 0) {
668
			if (webProducts.size() == 0) {
670
				return new ArrayList<>();
669
				return new ArrayList<>();
671
			}
670
			}
672
 
671
 
673
			mandatoryQ.add(String.format(
672
			mandatoryQ.add(String.format("+{!parent which=\"catalogId_i:" + StringUtils.join(webProducts, " ")
674
					"+{!parent which=\"catalogId_i:" + StringUtils.join(webProducts, " ") + "\"} AND active_b:true"));
673
					+ "\"} AND active_b:true AND hsncode_s:85171300"));
675
 
674
 
676
		}
675
		}
677
		params.put("q", StringUtils.join(mandatoryQ, " "));
676
		params.put("q", StringUtils.join(mandatoryQ, " "));
678
		params.put("fl", "*, [child parentFilter=id:catalog* childFilter=active_b:true ]");
677
		params.put("fl", "*, [child parentFilter=id:catalog* childFilter=active_b:true ]");
679
 
678