Skip to content

Commit

Permalink
Merge pull request #1527 from PradyumnaNagendra/release-4.1.0
Browse files Browse the repository at this point in the history
#SB-25799 fix: Coursebatch ES sync issue fix
  • Loading branch information
Pradyumna authored Jul 20, 2021
2 parents e2aed48 + 6a00764 commit 604e85a
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ private void pushDocsToES(List<Row> rows, List<String> docids, String index) thr
String docId = docids.stream().map(key -> (String) docMap.get(key.toLowerCase())).collect(Collectors.toList())
.stream().collect(Collectors.joining("_"));

System.out.println(docMap);
//System.out.println(docMap);
Map<String, Object> esDoc = new HashMap<>();
for(String key : docMap.keySet()){
String esKey = CassandraColumns.COLUMNS.get(key);
Expand All @@ -173,7 +173,9 @@ private void pushDocsToES(List<Row> rows, List<String> docids, String index) thr
mapCertTemplate(esDoc);
esDoc.put("identifier", docId);
esDoc.put("id", docId);
System.out.println("ES DOC for : " + docId +" : " +esDoc);
esDocs.put(docId, esDoc);

}
if(MapUtils.isNotEmpty(esDocs)) {
ElasticSearchUtil.bulkIndexWithIndexId(index, "_doc", esDocs);
Expand Down

0 comments on commit 604e85a

Please sign in to comment.