Transaction transaction = fullTextSession.beginTransaction();
final QueryBuilder monthQb = fullTextSession.getSearchFactory()
.buildQueryBuilder().forEntity( Month.class ).get();
//Rather complex code here as we're not exposing the #withFieldBridge methods on the public interface
final ConnectedTermMatchingContext field1Context = (ConnectedTermMatchingContext) monthQb
.keyword()
.onField( MonthClassBridge.FIELD_NAME_1 );
final ConnectedTermMatchingContext field2Context = (ConnectedTermMatchingContext) field1Context
.withFieldBridge( new String2FieldBridgeAdaptor( new RomanNumberFieldBridge() ) )
.andField( MonthClassBridge.FIELD_NAME_2 );
Query query = field2Context
.withFieldBridge( new String2FieldBridgeAdaptor( new RomanNumberFieldBridge() ) )
.matching( 2 )
.createQuery();
assertEquals( 1, fullTextSession.createFullTextQuery( query, Month.class ).getResultSize() );