Changeset 30974 for other-projects
- Timestamp:
- 2016-10-28T13:47:10+13:00 (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
other-projects/hathitrust/solr-extracted-features/trunk/src/main/java/org/hathitrust/PagedJSON.java
r30973 r30974 91 91 protected JSONObject generateSolrDocJSON(String volume_id, String page_id, JSONObject ef_page) 92 92 { 93 JSONObject solr_ add_json = null;93 JSONObject solr_update_json = null; 94 94 95 95 if (ef_page != null) { … … 99 99 if (ef_token_pos_count != null) { 100 100 101 solr_add_json = new JSONObject();101 JSONObject solr_add_json = new JSONObject(); 102 102 103 103 String text = generateSolrText(ef_token_pos_count); 104 105 106 104 107 105 JSONObject solr_doc_json = new JSONObject(); … … 109 107 solr_doc_json.put("volumeid_s", volume_id); 110 108 solr_doc_json.put("_text_", text); 111 solr_doc_json.put("commitWithin", 5000);112 109 113 solr_add_json.put("add", solr_doc_json); 110 solr_add_json.put("commitWithin", 5000); 111 solr_add_json.put("doc", solr_doc_json); 112 113 solr_update_json = new JSONObject(); 114 solr_update_json.put("add",solr_add_json); 115 114 116 } 115 117 else { … … 169 171 170 172 //return solr_doc_json; 171 return solr_ add_json;173 return solr_update_json; 172 174 } 173 175
Note:
See TracChangeset
for help on using the changeset viewer.