FullTextQuery fullTextQuery = fullTextSession.createFullTextQuery( query, Value.class );
fullTextQuery.setProjection(
FullTextQuery.DOCUMENT
);
fullTextQuery.setResultTransformer( new ProjectionToMapResultTransformer() );
List mappedResults = fullTextQuery.list();
assertTrue( "Wrong result size", mappedResults.size() == 1 );
Map map = (Map) mappedResults.get( 0 );
Document document = (Document) map.get( FullTextQuery.DOCUMENT );