| Line 19... |
Line 19... |
| 19 |
|
19 |
|
| 20 |
import org.apache.logging.log4j.LogManager;
|
20 |
import org.apache.logging.log4j.LogManager;
|
| 21 |
import org.apache.logging.log4j.Logger;
|
21 |
import org.apache.logging.log4j.Logger;
|
| 22 |
import org.apache.solr.client.solrj.SolrClient;
|
22 |
import org.apache.solr.client.solrj.SolrClient;
|
| 23 |
import org.apache.solr.client.solrj.impl.HttpSolrClient;
|
23 |
import org.apache.solr.client.solrj.impl.HttpSolrClient;
|
| 24 |
import org.apache.solr.client.solrj.response.schema.SchemaResponse.UpdateResponse;
|
- |
|
| 25 |
import org.apache.solr.common.SolrInputDocument;
|
24 |
import org.apache.solr.common.SolrInputDocument;
|
| 26 |
import org.json.JSONArray;
|
25 |
import org.json.JSONArray;
|
| 27 |
import org.json.JSONException;
|
26 |
import org.json.JSONException;
|
| 28 |
import org.json.JSONObject;
|
27 |
import org.json.JSONObject;
|
| 29 |
import org.springframework.beans.factory.annotation.Autowired;
|
28 |
import org.springframework.beans.factory.annotation.Autowired;
|
| - |
|
29 |
import org.springframework.beans.factory.annotation.Value;
|
| 30 |
import org.springframework.stereotype.Component;
|
30 |
import org.springframework.stereotype.Component;
|
| 31 |
|
31 |
|
| 32 |
import com.google.gson.Gson;
|
32 |
import com.google.gson.Gson;
|
| 33 |
import com.spice.profitmandi.dao.entity.catalog.TagListing;
|
33 |
import com.spice.profitmandi.dao.entity.catalog.TagListing;
|
| 34 |
import com.spice.profitmandi.dao.entity.catalog.TagRanking;
|
34 |
import com.spice.profitmandi.dao.entity.catalog.TagRanking;
|
| Line 61... |
Line 61... |
| 61 |
private WebListingRepository webListingRepository;
|
61 |
private WebListingRepository webListingRepository;
|
| 62 |
|
62 |
|
| 63 |
@Autowired
|
63 |
@Autowired
|
| 64 |
private WebProductListingRepository webProductListingRepository;
|
64 |
private WebProductListingRepository webProductListingRepository;
|
| 65 |
|
65 |
|
| - |
|
66 |
@Value("${new.solr.url}")
|
| - |
|
67 |
private String solrUrl;
|
| - |
|
68 |
|
| 66 |
private static final Logger logger = LogManager.getLogger(FofoSolr.class);
|
69 |
private static final Logger logger = LogManager.getLogger(FofoSolr.class);
|
| 67 |
|
70 |
|
| 68 |
private static final List<Integer> CATEGORY_MASTER = Arrays.asList(10006, 10010, 14202, 14203);
|
71 |
private static final List<Integer> CATEGORY_MASTER = Arrays.asList(10006, 10010, 14202, 14203);
|
| 69 |
|
72 |
|
| 70 |
String solrPath = "http://localhost:8984/solr/demo";
|
73 |
String solrPath = "http://" + solrUrl + "8984/solr/demo";
|
| 71 |
String mongoHost = "localhost";
|
74 |
String mongoHost = "localhost";
|
| 72 |
SolrClient solr = new HttpSolrClient.Builder(solrPath).build();
|
75 |
SolrClient solr = new HttpSolrClient.Builder(solrPath).build();
|
| 73 |
|
76 |
|
| 74 |
private String getAvailabilityJSON() {
|
77 |
private String getAvailabilityJSON() {
|
| 75 |
String url = "http://50.116.10.120/reports/run.php?execute_mode=EXECUTE&xmlin=warehousecisnew.xml&project=FOCOR&project_password=focor&target_format=JSON";
|
78 |
String url = "http://50.116.10.120/reports/run.php?execute_mode=EXECUTE&xmlin=warehousecisnew.xml&project=FOCOR&project_password=focor&target_format=JSON";
|