Subversion Repositories SmartDukaan

Rev

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

Rev 33486 Rev 33499
Line 66... Line 66...
66
 
66
 
67
	private static final Logger logger = LogManager.getLogger(FofoSolr.class);
67
	private static final Logger logger = LogManager.getLogger(FofoSolr.class);
68
 
68
 
69
	private static final List<Integer> CATEGORY_MASTER = Arrays.asList(10006, 10010, 14202, 14203);
69
	private static final List<Integer> CATEGORY_MASTER = Arrays.asList(10006, 10010, 14202, 14203);
70
 
70
 
71
	String solrPath = "http://" + solrUrl + ":8984/solr/demo";
-
 
72
	String mongoHost = "localhost";
71
	String mongoHost = "localhost";
73
	SolrClient solr = new HttpSolrClient.Builder(solrPath).build();
-
 
74
 
72
 
75
	private String getAvailabilityJSON() {
73
	private String getAvailabilityJSON() {
76
		String url = reporticoUrl + "?execute_mode=EXECUTE&xmlin=warehousecisnew.xml&project=FOCOR&project_password=focor&target_format=JSON";
74
		String url = reporticoUrl + "?execute_mode=EXECUTE&xmlin=warehousecisnew.xml&project=FOCOR&project_password=focor&target_format=JSON";
77
		return getUrlContent(url);
75
		return getUrlContent(url);
78
	}
76
	}
Line 500... Line 498...
500
			catalogSolrObjs.add(catalogSolrObj);
498
			catalogSolrObjs.add(catalogSolrObj);
501
 
499
 
502
		}
500
		}
503
 
501
 
504
		logger.info("catalogSolrObjs {}", catalogSolrObjs);
502
		logger.info("catalogSolrObjs {}", catalogSolrObjs);
-
 
503
 
-
 
504
		String solrPath = "http://" + solrUrl + ":8984/solr/demo";
-
 
505
		SolrClient solr = new HttpSolrClient.Builder(solrPath).build();
-
 
506
 
505
		solr.deleteByQuery("*:*");
507
		solr.deleteByQuery("*:*");
506
		solr.add(catalogSolrObjs);
508
		solr.add(catalogSolrObjs);
507
 
509
 
508
		org.apache.solr.client.solrj.response.UpdateResponse updateResponse = solr.commit();
510
		org.apache.solr.client.solrj.response.UpdateResponse updateResponse = solr.commit();
509
		logger.info("solr {}", updateResponse.getStatus());
511
		logger.info("solr {}", updateResponse.getStatus());