We're updating the issue view to help you get more done. 

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

Components

Affects versions

3.0.0.beta3

Priority

Major