private List<IterableBridgeTestEntity> findEmbeddedNullResults(String fieldName, Object value, boolean checkForNullToken) {
QueryBuilder queryBuilder = fullTextSession.getSearchFactory().buildQueryBuilder()
.forEntity( IterableBridgeTestEntity.class ).get();
TermMatchingContext termMatchingContext = queryBuilder.keyword().onField( fieldName );
if ( checkForNullToken ) {
termMatchingContext.ignoreFieldBridge();
}
Query query = termMatchingContext
.ignoreAnalyzer()
.matching( value ).createQuery();
return fullTextSession.createFullTextQuery( query, IterableBridgeTestEntity.class ).list();