Skip to content

Commit

Permalink
Merge pull request #1212 from PradyumnaNagendra/new_objecttype
Browse files Browse the repository at this point in the history
Issue #SC-1925 feat: Fixed synctool issue  for syncbyids
  • Loading branch information
maheshkumargangula authored Sep 28, 2020
2 parents 1cf3a33 + 0dc83a8 commit 88ff382
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ search.batch.size=500
search.connection.timeout=30
search.index.name="compositesearch"

nested.fields=[badgeAssertions,targets,badgeAssociations,plugins,me_totalTimeSpentInSec,me_totalPlaySessionCount,batches]
nested.fields=["badgeAssertions","targets","badgeAssociations","plugins","me_totalTimeSpent","me_totalPlaySessionCount","me_totalTimeSpentInSec","batches","trackable","credentials"]
channel.default="in.ekstep"

# Cassandra Configurations
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,7 @@ private void populateESDoc(Map<String, Object> unitsMetadata, Map<String, Object
try {
Node node = ConvertToGraphNode.convertToGraphNode(childData, definitionDTO, null);
node.setGraphId(graphId);
node.setObjectType(objectType);
node.setObjectType("Collection");
node.setNodeType(nodeType);
Map<String, Object> nodeMap = SyncMessageGenerator.getMessage(node);
Map<String, Object> message = SyncMessageGenerator.getJSONMessage(nodeMap, relationMap);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,13 +33,13 @@ public class SyncShellCommands implements CommandMarker {
public void syncByIds(@CliOption(key = {
"graphId" }, mandatory = false, unspecifiedDefaultValue = "domain", help = "graphId of the object") final String graphId,
@CliOption(key = { "id", "ids" }, mandatory = true, help = "Unique Id of node object") final String[] ids,
@CliOption(key = {"metaDataRefresh"}, mandatory = false, help = "Refresh node metadata") final Boolean metaDataRefresh)
@CliOption(key = {"metaDataRefresh"}, mandatory = false, unspecifiedDefaultValue = "false", help = "Refresh node metadata") final String metaDataRefresh)
throws Exception {

long startTime = System.currentTimeMillis();
DateTimeFormatter dtf = DateTimeFormatter.ofPattern("yyyy/MM/dd HH:mm:ss");
LocalDateTime start = LocalDateTime.now();
if (metaDataRefresh)
if ("true".equalsIgnoreCase(metaDataRefresh))
syncManager.syncCollectionIds(graphId, new ArrayList<>(Arrays.asList(ids)));
else
indexSyncManager.syncByIds(graphId, new ArrayList<>(Arrays.asList(ids)));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ search.fields.query=["name^100","title^100","lemma^100","code^100","tags^100","d
search.fields.date=["lastUpdatedOn","createdOn","versionDate","lastSubmittedOn","lastPublishedOn"]
search.batch.size=500

nested.fields=["badgeAssertions","targets","relatedBoards","me_totalTimeSpentInSec","me_totalPlaySessionCount","batches"]
nested.fields=["badgeAssertions","targets","badgeAssociations","plugins","me_totalTimeSpent","me_totalPlaySessionCount","me_totalTimeSpentInSec","batches","trackable","credentials"]

batch.size=50

Expand Down

0 comments on commit 88ff382

Please sign in to comment.