Lazy loaded property isn't indexed properly

Description

@Column(name = "CONTENT")
@Length(min = 0, max = 32768)
@Basic(fetch = FetchType.LAZY) // Lazy loaded through bytecode instrumentation
@org.hibernate.search.annotations.Field(index = org.hibernate.search.annotations.Index.TOKENIZED)
private String content;

I use fulltextSession.index(o) and I only get two terms indexed "text" and "edit". I don't know where these are coming from actually, no object has these content values.

If I trigger an o.getContent() before fulltextSession.index(o), the content is loaded with sequential selects for the lazy property and correctly indexed.

Environment

None

Status

Assignee

Unassigned

Reporter

Christian Bauer

Labels

None

Suitable for new contributors

None

Pull Request

None

Feedback Requested

None

Components

Affects versions

Priority

Major
Configure