Postgres terminology service hard coded column names migration (#5866)
* updating parent pids column name * updating name of the fullTestField Search * updating name of the fullTestField Search * fixing typo. * failing test. * - Moving FullTextField annotation from getter method and adding it to the newly added VC property of the entity; - reverting the name of the FullTextField entity to its previous name of 'myParentPids'; - reverting the name of the lucene index to search on in the terminology service. - updating the changelog; * making spotless happy --------- Co-authored-by: peartree <etienne.poirier@smilecdr.com>
This commit is contained in:
parent
4322b83257
commit
07f879d276
|
@ -0,0 +1,5 @@
|
||||||
|
---
|
||||||
|
type: fix
|
||||||
|
issue: 5865
|
||||||
|
title: "Moving the Hibernate.Search annotation for text indexing from the lob column to the column added as part of the
|
||||||
|
PostgreSql LOB migration."
|
|
@ -43,7 +43,6 @@ import jakarta.persistence.SequenceGenerator;
|
||||||
import jakarta.persistence.Table;
|
import jakarta.persistence.Table;
|
||||||
import jakarta.persistence.Temporal;
|
import jakarta.persistence.Temporal;
|
||||||
import jakarta.persistence.TemporalType;
|
import jakarta.persistence.TemporalType;
|
||||||
import jakarta.persistence.Transient;
|
|
||||||
import jakarta.persistence.UniqueConstraint;
|
import jakarta.persistence.UniqueConstraint;
|
||||||
import org.apache.commons.lang3.Validate;
|
import org.apache.commons.lang3.Validate;
|
||||||
import org.apache.commons.lang3.builder.EqualsBuilder;
|
import org.apache.commons.lang3.builder.EqualsBuilder;
|
||||||
|
@ -58,10 +57,7 @@ import org.hibernate.search.mapper.pojo.bridge.mapping.annotation.RoutingBinderR
|
||||||
import org.hibernate.search.mapper.pojo.mapping.definition.annotation.FullTextField;
|
import org.hibernate.search.mapper.pojo.mapping.definition.annotation.FullTextField;
|
||||||
import org.hibernate.search.mapper.pojo.mapping.definition.annotation.GenericField;
|
import org.hibernate.search.mapper.pojo.mapping.definition.annotation.GenericField;
|
||||||
import org.hibernate.search.mapper.pojo.mapping.definition.annotation.Indexed;
|
import org.hibernate.search.mapper.pojo.mapping.definition.annotation.Indexed;
|
||||||
import org.hibernate.search.mapper.pojo.mapping.definition.annotation.IndexingDependency;
|
|
||||||
import org.hibernate.search.mapper.pojo.mapping.definition.annotation.ObjectPath;
|
|
||||||
import org.hibernate.search.mapper.pojo.mapping.definition.annotation.PropertyBinding;
|
import org.hibernate.search.mapper.pojo.mapping.definition.annotation.PropertyBinding;
|
||||||
import org.hibernate.search.mapper.pojo.mapping.definition.annotation.PropertyValue;
|
|
||||||
import org.hl7.fhir.r4.model.Coding;
|
import org.hl7.fhir.r4.model.Coding;
|
||||||
|
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
|
@ -177,6 +173,11 @@ public class TermConcept implements Serializable {
|
||||||
@Column(name = "PARENT_PIDS", nullable = true)
|
@Column(name = "PARENT_PIDS", nullable = true)
|
||||||
private String myParentPids;
|
private String myParentPids;
|
||||||
|
|
||||||
|
@FullTextField(
|
||||||
|
name = "myParentPids",
|
||||||
|
searchable = Searchable.YES,
|
||||||
|
projectable = Projectable.YES,
|
||||||
|
analyzer = "conceptParentPidsAnalyzer")
|
||||||
@Column(name = "PARENT_PIDS_VC", nullable = true, length = Length.LONG32)
|
@Column(name = "PARENT_PIDS_VC", nullable = true, length = Length.LONG32)
|
||||||
private String myParentPidsVc;
|
private String myParentPidsVc;
|
||||||
|
|
||||||
|
@ -362,13 +363,6 @@ public class TermConcept implements Serializable {
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Transient
|
|
||||||
@FullTextField(
|
|
||||||
name = "myParentPids",
|
|
||||||
searchable = Searchable.YES,
|
|
||||||
projectable = Projectable.YES,
|
|
||||||
analyzer = "conceptParentPidsAnalyzer")
|
|
||||||
@IndexingDependency(derivedFrom = @ObjectPath({@PropertyValue(propertyName = "myParentPidsVc")}))
|
|
||||||
public String getParentPidsAsString() {
|
public String getParentPidsAsString() {
|
||||||
return nonNull(myParentPidsVc) ? myParentPidsVc : myParentPids;
|
return nonNull(myParentPidsVc) ? myParentPidsVc : myParentPids;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue