public class MyBridge implements HibernateSearchComplexBridge {
private FieldDefinition myField1;
private FieldDefinition myField2;
private FieldDefinition myField3;
public void register(FieldRegistry registry, String defaultRelativeName) {
myField1 = registry.start("name1", Types.SOME_TYPE). ... .build();
myField2 = registry.start("name2", Types.SOME_TYPE). ... .build();
myField3 = registry.start("name3", Types.SOME_TYPE). ... .build();
}
public void set(org.hibernate.search.Document document) {
document.set(myField1, someValue);
document.set(myField2, someValue);
document.set(myField3, someValue);
}
}