tx.commit();
s.close();
s = Search.getFullTextSession( openSession() );
s.getTransaction().begin();
s.doWork( new Work() {
@Override
public void execute(Connection connection) throws SQLException {
Statement stmt = connection.createStatement();
stmt.executeUpdate( "update Email set body='Meet the guys who write the software'" );
stmt.close();
}
} );
s.doWork( new Work() {
@Override
public void execute(Connection connection) throws SQLException {
//insert an object never indexed
Statement stmt = connection.createStatement();
stmt.executeUpdate( "insert into Email(id, title, body, header) values( + "