s.close();
//check non created object does get found!!1
s = new FullTextSessionImpl( openSession() );
tx = s.beginTransaction();
QueryParser parser = new QueryParser( "id", new StopAnalyzer() );
List result = s.createFullTextQuery( parser.parse( "body:create" ) ).list();
assertEquals( 0, result.size() );
tx.commit();
s.close();
s = new FullTextSessionImpl( openSession() );
s.getTransaction().begin();
s.connection().createStatement().executeUpdate( "update Email set body='Meet the guys who write the software'" );
//insert an object never indexed
s.connection().createStatement().executeUpdate( "insert into Email(id, title, body, header) values( + "
+ ( loop + 1 ) + ", 'Bob Sponge', 'Meet the guys who create the software', 'nope')" );
s.getTransaction().commit();
s.close();
s = new FullTextSessionImpl( openSession() );
tx = s.beginTransaction();
parser = new QueryParser( "id", new StopAnalyzer() );
result = s.createFullTextQuery( parser.parse( "body:write" ) ).list();
assertEquals( 0, result.size() );
result = s.createCriteria( Email.class ).list();
for (int i = 0; i < loop / 2; i++)
s.index( result.get( i ) );