Skip to content

Commit e29dc54

Browse files
feat: add support to enable search index full text (hapifhir#828)
Signed-off-by: Saurav Sharma <[email protected]>
1 parent 0b907a4 commit e29dc54

File tree

6 files changed

+14
-0
lines changed

6 files changed

+14
-0
lines changed

src/main/java/ca/uhn/fhir/jpa/starter/AppProperties.java

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ public class AppProperties {
3434
private Boolean mdm_enabled = false;
3535
private String mdm_rules_json_location = "mdm-rules.json";
3636
private boolean advanced_lucene_indexing = false;
37+
private boolean search_index_full_text_enabled = false;
3738
private boolean enable_index_of_type = false;
3839
private Boolean allow_cascading_deletes = false;
3940
private Boolean allow_contains_searches = true;
@@ -284,6 +285,14 @@ public void setAdvanced_lucene_indexing(boolean theAdvanced_lucene_indexing) {
284285
advanced_lucene_indexing = theAdvanced_lucene_indexing;
285286
}
286287

288+
public boolean getSearch_index_full_text_enabled() {
289+
return this.search_index_full_text_enabled;
290+
}
291+
292+
public void setSearch_index_full_text_enabled(boolean theSearch_index_full_text_enabled) {
293+
search_index_full_text_enabled = theSearch_index_full_text_enabled;
294+
}
295+
287296
public Boolean getAllow_cascading_deletes() {
288297
return allow_cascading_deletes;
289298
}

src/main/java/ca/uhn/fhir/jpa/starter/common/FhirServerConfigCommon.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -201,6 +201,7 @@ public JpaStorageSettings jpaStorageSettings(AppProperties appProperties) {
201201

202202
jpaStorageSettings.setFilterParameterEnabled(appProperties.getFilter_search_enabled());
203203
jpaStorageSettings.setHibernateSearchIndexSearchParams(appProperties.getAdvanced_lucene_indexing());
204+
jpaStorageSettings.setHibernateSearchIndexFullText(appProperties.getSearch_index_full_text_enabled());
204205
jpaStorageSettings.setTreatBaseUrlsAsLocal(new HashSet<>(appProperties.getLocal_base_urls()));
205206
jpaStorageSettings.setTreatReferencesAsLogical(new HashSet<>(appProperties.getLogical_urls()));
206207

src/main/resources/application.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -200,6 +200,7 @@ hapi:
200200
### !!Extended Lucene/Elasticsearch Indexing is still a experimental feature, expect some features (e.g. _total=accurate) to not work as expected!!
201201
### more information here: https://hapifhir.io/hapi-fhir/docs/server_jpa/elastic.html
202202
advanced_lucene_indexing: false
203+
search_index_full_text_enabled: false
203204
bulk_export_enabled: false
204205
bulk_import_enabled: false
205206
# language_search_parameter_enabled: true

src/main/resources/cds.application.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -196,6 +196,7 @@ hapi:
196196
### !!Extended Lucene/Elasticsearch Indexing is still a experimental feature, expect some features (e.g. _total=accurate) to not work as expected!!
197197
### more information here: https://hapifhir.io/hapi-fhir/docs/server_jpa/elastic.html
198198
advanced_lucene_indexing: false
199+
search_index_full_text_enabled: false
199200
bulk_export_enabled: false
200201
bulk_import_enabled: false
201202
# language_search_parameter_enabled: true

src/test/java/ca/uhn/fhir/jpa/starter/ElasticsearchLastNR4IT.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@
5252
"hapi.fhir.lastn_enabled=true",
5353
"hapi.fhir.store_resource_in_lucene_index_enabled=true",
5454
"hapi.fhir.advanced_lucene_indexing=true",
55+
"hapi.fhir.search_index_full_text_enabled=true",
5556

5657
"elasticsearch.enabled=true",
5758
"hapi.fhir.cr_enabled=false",

src/test/resources/application.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,7 @@ hapi:
129129
### !!Extended Lucene/Elasticsearch Indexing is still a experimental feature, expect some features (e.g. _total=accurate) to not work as expected!!
130130
### more information here: https://hapifhir.io/hapi-fhir/docs/server_jpa/elastic.html
131131
advanced_lucene_indexing: false
132+
search_index_full_text_enabled: false
132133
# enforce_referential_integrity_on_delete: false
133134
# This is an experimental feature, and does not fully support _total and other FHIR features.
134135
# enforce_referential_integrity_on_delete: false

0 commit comments

Comments
 (0)