From 02d38bce1467aefad359385d2052221808a376db Mon Sep 17 00:00:00 2001 From: TipzCM Date: Fri, 13 Sep 2024 12:33:40 -0400 Subject: [PATCH] removing unneeded fields from HRJ_RESOURCE table (#6284) --- ...e-unneeded-fields-from-resource-table.yaml | 10 +++++++ .../fhir/jpa/model/entity/ResourceTable.java | 30 ------------------- 2 files changed, 10 insertions(+), 30 deletions(-) create mode 100644 hapi-fhir-docs/src/main/resources/ca/uhn/hapi/fhir/changelog/7_6_0/6283-remove-unneeded-fields-from-resource-table.yaml diff --git a/hapi-fhir-docs/src/main/resources/ca/uhn/hapi/fhir/changelog/7_6_0/6283-remove-unneeded-fields-from-resource-table.yaml b/hapi-fhir-docs/src/main/resources/ca/uhn/hapi/fhir/changelog/7_6_0/6283-remove-unneeded-fields-from-resource-table.yaml new file mode 100644 index 00000000000..a1e871a8656 --- /dev/null +++ b/hapi-fhir-docs/src/main/resources/ca/uhn/hapi/fhir/changelog/7_6_0/6283-remove-unneeded-fields-from-resource-table.yaml @@ -0,0 +1,10 @@ +--- +type: remove +issue: 6283 +title: "Hibernate Search Fulltext fields which were unused + have been removed from indexing. + This will reduce storage usage in Lucene and Elasticsearch. + The fields that were removed are: `myNarrativeTextEdgeNGram`, + `myNarrativeTextNGram`, `myNarrativeTextPhonetic`, `myContentTextEdgeNGram`, + `myContentTextNGram`, `myContentTextPhonetic`. +" diff --git a/hapi-fhir-jpaserver-model/src/main/java/ca/uhn/fhir/jpa/model/entity/ResourceTable.java b/hapi-fhir-jpaserver-model/src/main/java/ca/uhn/fhir/jpa/model/entity/ResourceTable.java index e897ae71786..6163011eeb4 100644 --- a/hapi-fhir-jpaserver-model/src/main/java/ca/uhn/fhir/jpa/model/entity/ResourceTable.java +++ b/hapi-fhir-jpaserver-model/src/main/java/ca/uhn/fhir/jpa/model/entity/ResourceTable.java @@ -119,21 +119,6 @@ public class ResourceTable extends BaseHasResource implements Serializable, IBas searchable = Searchable.YES, projectable = Projectable.YES, analyzer = "standardAnalyzer") - @FullTextField( - name = "myContentTextEdgeNGram", - searchable = Searchable.YES, - projectable = Projectable.NO, - analyzer = "autocompleteEdgeAnalyzer") - @FullTextField( - name = "myContentTextNGram", - searchable = Searchable.YES, - projectable = Projectable.NO, - analyzer = "autocompleteNGramAnalyzer") - @FullTextField( - name = "myContentTextPhonetic", - searchable = Searchable.YES, - projectable = Projectable.NO, - analyzer = "autocompletePhoneticAnalyzer") @OptimisticLock(excluded = true) @IndexingDependency(derivedFrom = @ObjectPath(@PropertyValue(propertyName = "myVersion"))) private String myContentText; @@ -171,21 +156,6 @@ public class ResourceTable extends BaseHasResource implements Serializable, IBas searchable = Searchable.YES, projectable = Projectable.YES, analyzer = "standardAnalyzer") - @FullTextField( - name = "myNarrativeTextEdgeNGram", - searchable = Searchable.YES, - projectable = Projectable.NO, - analyzer = "autocompleteEdgeAnalyzer") - @FullTextField( - name = "myNarrativeTextNGram", - searchable = Searchable.YES, - projectable = Projectable.NO, - analyzer = "autocompleteNGramAnalyzer") - @FullTextField( - name = "myNarrativeTextPhonetic", - searchable = Searchable.YES, - projectable = Projectable.NO, - analyzer = "autocompletePhoneticAnalyzer") @OptimisticLock(excluded = true) @IndexingDependency(derivedFrom = @ObjectPath(@PropertyValue(propertyName = "myVersion"))) private String myNarrativeText;