Skip to content

Commit 5dcd67d

Browse files
committed
Checking if we should update linking index
1 parent 54ee740 commit 5dcd67d

File tree

2 files changed

+13
-2
lines changed

2 files changed

+13
-2
lines changed

JeMPI_Apps/JeMPI_Configuration/src/main/scala/configuration/CustomDgraphIndexes.scala

+12-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ private object CustomDgraphIndexes {
2525
| }
2626
|
2727
| public static Boolean shouldUpdateLinkingIndexes() {
28-
| return true;
28+
| return ${get_should_update_linking_indexes()};
2929
| }
3030
|""".stripMargin);
3131

@@ -42,6 +42,17 @@ private object CustomDgraphIndexes {
4242
writer.close()
4343

4444

45+
def get_should_update_linking_indexes(): String = {
46+
if (config.rules.link.isDefined){
47+
val linkRules = config.rules.link.get
48+
if (linkRules.deterministic.isDefined && !linkRules.probabilistic.isDefined){
49+
return "true"
50+
}
51+
}
52+
53+
return "false"
54+
}
55+
4556
def get_default_indexes(): Unit = {
4657
write_out_indexs_fields("LOAD_DEFAULT_INDEXES", write_field_with_index)
4758
}

JeMPI_Apps/JeMPI_LibMPI/src/main/java/org/jembi/jempi/libmpi/dgraph/CustomDgraphIndexes.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ private CustomDgraphIndexes() {
77
}
88

99
public static Boolean shouldUpdateLinkingIndexes() {
10-
return true;
10+
return false;
1111
}
1212

1313
static final String LOAD_DEFAULT_INDEXES =

0 commit comments

Comments
 (0)