Skip to content

feat: add support to enable search index full text #828

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 8, 2025

Conversation

iamsauravsharma
Copy link
Contributor

Add support to enable search index full text disabled by default hapifhir/hapi-fhir#6426. This was enabled by default and non configurable for version 7.6.0 and older and disabled by default from version 8.0.0 and newer which can be enabled
Fixes: #807

@robogary
Copy link

robogary commented Jun 4, 2025

Formatting check succeeded!

@jkiddo jkiddo requested a review from Copilot June 5, 2025 20:39
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

Adds configurable support for enabling full-text search indexing, which is disabled by default.

  • Introduces a new search_index_full_text_enabled property in YAML and Java configuration
  • Wires the flag into JpaStorageSettings via FhirServerConfigCommon
  • Updates test and application templates to include the new flag

Reviewed Changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated no comments.

Show a summary per file
File Description
src/test/resources/application.yaml Add default search_index_full_text_enabled: false
src/test/java/ca/uhn/fhir/jpa/starter/ElasticsearchLastNR4IT.java Enable the new flag in test configuration
src/main/resources/cds.application.yaml Add default search_index_full_text_enabled: false
src/main/resources/application.yaml Add default search_index_full_text_enabled: false
src/main/java/ca/uhn/fhir/jpa/starter/common/FhirServerConfigCommon.java Wire the new property into JpaStorageSettings
src/main/java/ca/uhn/fhir/jpa/starter/AppProperties.java Define field, getter, and setter for the new property
Comments suppressed due to low confidence (2)

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

  • The method name getSearch_index_full_text_enabled() uses underscores and deviates from standard Java bean naming conventions. Consider renaming it to getSearchIndexFullTextEnabled() (and likewise update the field and setter) to improve consistency and ensure proper property binding.
public boolean getSearch_index_full_text_enabled() {

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

  • This test enables full-text search but doesn’t verify that the feature is actually applied. Add an assertion to confirm that enabling this flag modifies search results or index behavior as intended.
"hapi.fhir.search_index_full_text_enabled=true",

@jkiddo jkiddo merged commit e29dc54 into hapifhir:master Jun 8, 2025
4 of 5 checks passed
@iamsauravsharma iamsauravsharma deleted the fix-full_text branch June 9, 2025 03:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

How to enable full text search in docker container?
3 participants