Field serialization enum spring data solr

I have this field in a domain object

@Field
@Enumerated(EnumType.STRING)
private SectionType sectionType;

but when I check the value stored in Solr, it is something like:

com.x.y.objects.SectionType:H_HPI

I want only H_HPI or it is as if I were calling the specialty.name () method. Also I want the serializer to do this for all enum fields in my domain objects.

I know that for neo4j, for example, it has such a serializer and can be passed to the field as an annotation. Also mongodb does the conversion automatically.

+4
source share

Source: https://habr.com/ru/post/1650571/


All Articles