@Entity
@Indexed
public class Resume implements Serializable {
/**
*
*/
private static final long serialVersionUID = 1L;
@Id
@GeneratedValue
@DocumentId
private Long id;
@OneToOne
@IndexedEmbedded
private User applicant;
@Field(index = Index.TOKENIZED, store = Store.YES)
private String summary;
@Lob
@Field(name = "resume", index = Index.TOKENIZED, store = Store.NO)
@FieldBridge(impl = WordDocHandlerBridge.class)
private byte[] content; // MS Word Doc
@Temporal(value=TemporalType.DATE)
@Field(index = Index.UN_TOKENIZED, store = Store.YES)
@DateBridge(resolution = Resolution.DAY) // can't project
@Boost(2.0f)
private Date lastUpdated;
//...
}
FullTextQuery fq = fullTextEntityManager.createFullTextQuery(
bq, Resume.class);
fq.setProjection(FullTextQuery.SCORE, "id",
"summary",
"lastUpdated", // projection on this field
);
The lastUpdated field annotated with @DateBridge raised the error.
|