Changeset 31499 for other-projects/hathitrust/wcsa/extracted-features-solr
- Timestamp:
- 2017-03-13T13:54:54+13:00 (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
other-projects/hathitrust/wcsa/extracted-features-solr/trunk/solr-ingest/src/main/java/org/hathitrust/extractedfeatures/SolrDocJSON.java
r31378 r31499 4 4 import java.io.BufferedWriter; 5 5 import java.io.IOException; 6 import java.io.InputStream; 6 7 import java.io.InputStreamReader; 7 8 import java.io.OutputStream; … … 557 558 } 558 559 559 public static void postSolrDoc(String post_url, JSONObject solr_add_doc_json) 560 public static void postSolrDoc(String post_url, JSONObject solr_add_doc_json, 561 String volume_id, String page_id) 560 562 { 561 563 … … 566 568 567 569 568 System.out.println("**** post_url =" + post_url);570 // System.out.println("Post URL: " + post_url); 569 571 570 572 try { … … 584 586 // Read response 585 587 StringBuilder sb = new StringBuilder(); 586 BufferedReader in = new BufferedReader(new InputStreamReader(httpcon.getInputStream())); 588 InputStream is = httpcon.getInputStream(); 589 BufferedReader in = new BufferedReader(new InputStreamReader(is)); 587 590 String decodedString; 588 591 while ((decodedString = in.readLine()) != null) { … … 607 610 608 611 } 612 catch (IOException e) { 613 System.err.println("Solr core update failed when processing id: " + volume_id + "." + page_id); 614 e.printStackTrace(); 615 } 616 609 617 catch (Exception e) { 610 618 e.printStackTrace();
Note:
See TracChangeset
for help on using the changeset viewer.