Skip to content

Commit

Permalink
make updating fts search tables optional
Browse files Browse the repository at this point in the history
- This updates can take a long time during initial sync
- The implementing application can directly query the original tables
with the that have columns that are indexed at a similar or better speeds
  • Loading branch information
hilpitome committed Aug 28, 2024
1 parent 4fcf06c commit b007161
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 5 deletions.
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -307,11 +307,12 @@ By placing a file named `app.properties` in your implementation assets folder (S
### Configurable Settings

| Configuration | Type | Default | Description |
| ---------------------------------------- | ------- | ------- | --------------------------------------------------------------------------------------------------------------------------------------------------- |
| ---------------------------------------- | ------- | ------- |-----------------------------------------------------------------------------------------------------------------------------------------------------|
| `system.toaster.centered` | Boolean | false | Position toaster(s) at the center of the view(s) |
| `disable.location.picker.view` | Boolean | false | Disables LocationPicker View |
| `location.picker.tag.shown` | Boolean | false | Hides/Shows the location tag in the location picker tree view |
| `encrypt.shared.preferences` | Boolean | false | Enable/disables encrypting SharedPreferences |
| `allow.offline.login.with.invalid.token` | Boolean | false | Allow offline login when token is no longer valid after a successful login when online and user is forcefully logged out |
| `enable.search.button` | Boolean | false | Enable/Disable search to be triggered only after clicking the search icon in `org.smartregister.view.fragment.BaseRegisterFragment` or its subclass |
| `feature.profile.images.disabled` | Boolean | false | Disable profile image capturing and rendering |
| `feature.profile.images.disabled` | Boolean | false | Disable profile image capturing and rendering |
| `"disable.fts.search` | Boolean | false | Disable fts search which can slow down sync process |
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
VERSION_NAME=6.1.4-SNAPSHOT
VERSION_NAME=6.1.5-SNAPSHOT
VERSION_CODE=1
GROUP=org.smartregister
POM_SETTING_DESCRIPTION=OpenSRP Client Core Application
Expand Down
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@ org.gradle.daemon=true
org.gradle.parallel=true
zipStoreBase=GRADLE_USER_HOME
org.gradle.configureondemand=true
org.gradle.jvmargs=-Xmx2048m
org.gradle.jvmargs=-Xmx2048m --add-opens java.base/java.io=ALL-UNNAMED --add-exports jdk.compiler/com.sun.tools.javac.code=ALL-UNNAMED
Original file line number Diff line number Diff line change
Expand Up @@ -352,6 +352,7 @@ public static class PROPERTY {
public static final String IGNORE_LOCATION_DELETION = "ignore.location.deletion";
public static final String ENABLE_SEARCH_BUTTON = "enable.search.button";
public static final String DISABLE_PROFILE_IMAGES_FEATURE = "feature.profile.images.disabled";
public static final String DISABLE_FTS_SEARCH_DISABLE="disable.fts.search";
}

public static class HTTP_REQUEST_HEADERS {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -364,7 +364,8 @@ public Boolean processCaseModel(Event event, Client client, List<String> creates

String entityId = contentValues.getAsString(CommonRepository.BASE_ENTITY_ID_COLUMN);
String clientType = client.getClientType() != null ? client.getClientType() : (client.getRelationships() != null ? AllConstants.ECClientType.CHILD : null);
updateFTSsearch(tableName, clientType, entityId, contentValues);
if (!CoreLibrary.getInstance().context().getAppProperties().isTrue(AllConstants.PROPERTY.DISABLE_PROFILE_IMAGES_FEATURE))
updateFTSsearch(tableName, clientType, entityId, contentValues);
Long timestamp = getEventDate(event.getEventDate());
addContentValuesToDetailsTable(contentValues, timestamp);
updateClientDetailsTable(event, client);
Expand Down

0 comments on commit b007161

Please sign in to comment.