Hibernate Search 6 - computed mapping

Hello !
i don’t know if it’s really an issue but the annotation mapping don’t work on Transient method who don’t start width get

this works

@Transient
	@FullTextField(name = "libelle", analyzer = "standard", searchable = Searchable.YES)
	@IndexingDependency(derivedFrom = {
			@ObjectPath({@PropertyValue(propertyName = "yyyy"), @PropertyValue(propertyName = "xxxx")}))

	public String getLibelle() {
		return computedLibelle();
	}

this not

@Transient
	@FullTextField(name = "libelle", analyzer = "standard", searchable = Searchable.YES)
	@IndexingDependency(derivedFrom = {
			@ObjectPath({@PropertyValue(propertyName = "yyyy"), @PropertyValue(propertyName = "xxxx")}))

	public String libelle() {
		return computedLibelle();
	}

It’s expected; if I remember correctly Hibernate ORM is similarly limited and only considers getters that start with get.

We can’t completely fix this in Hibernate Search until the limitation is removed in ORM, for various reasons. We might be able to support non-standard getters for transient methods, but I’m really not sure about it.

Thx for the reply :wink: