I am trying to migrate my project from hibernate search 5.11 to hibernate 6. It seems so difficult !
I have changed the dependencies on pom.xml.
My new dependencies are
<dependency>
<groupId>org.hibernate.search</groupId>
<artifactId>hibernate-search-v5migrationhelper-orm</artifactId>
<version>6.0.10.Final</version>
</dependency>
<dependency>
<groupId>org.hibernate.search</groupId>
<artifactId>hibernate-search-mapper-orm</artifactId>
<version>6.0.10.Final</version>
</dependency>
<dependency>
<groupId>org.hibernate.search</groupId>
<artifactId>hibernate-search-backend-lucene</artifactId>
<version>6.0.10.Final</version>
</dependency>
After i moved the Indexed and IndexedEmbedded to differente package: org.hibernate.search.mapper.pojo.mapping.definition.annotation.*
and i changed all annotations like @Field @Sortablefield to @GenericField(sortable = Sortable.YES)
Compile my project and i got this problem.
type ‘.ObjectA’:
path ‘.propertyName.id’:
index ‘idx_name’:
failures:
- HSEARCH600080: Invalid index field type: missing decimal scale. Define the decimal scale explicitly.
The code of entities is:
@Indexed(index = "idx_name")
@Table(name = "tableName")
public class ObjectΑ {
@Id
@Column(name = "id", nullable = false, precision = 18)
private BigInteger id;
@ManyToOne(fetch = FetchType.LAZY, optional = false)
@JoinColumn(name = "propertyNameId", nullable = false)
@IndexedEmbedded
private ObjectB propertyName;
}
@Indexed(index = "idx_name2")
@Table(name = "tableName2")
public class ObjectΒ {
@Id
@Column(name = "id", nullable = false, precision = 18)
@GenericField(name = "pkid")
private BigInteger id;
}
Thank you !