Package org.hibernate.search.query.dsl

Examples of org.hibernate.search.query.dsl.TermMatchingContext.matching()


            context.andField(field);
        }

        BooleanJunction<BooleanJunction> bool = qb.bool();
        for (String searchTerm : searchTerms) {
            bool.must(context.matching(String.format("*%s*", searchTerm.toLowerCase())).createQuery());
        }

        final FullTextQuery fullTextQuery = session.createFullTextQuery(bool.createQuery(), clazz);
        fullTextQuery.setCriteriaQuery(query);
        return fullTextQuery;
View Full Code Here


        .forEntity( ArrayBridgeTestEntity.class ).get();
    TermMatchingContext termMatchingContext = queryBuilder.keyword().onField( fieldName );
    if ( checkNullToken ) {
      termMatchingContext.ignoreFieldBridge();
    }
    Query query = termMatchingContext.matching( value ).createQuery();
    return fullTextSession.createFullTextQuery( query, ArrayBridgeTestEntity.class ).list();
  }

  @SuppressWarnings("unchecked")
  private List<ArrayBridgeTestEntity> findNumericResults(String fieldName, Object number) {
View Full Code Here

        .forEntity( MapBridgeTestEntity.class ).get();
    TermMatchingContext termMatchingContext = queryBuilder.keyword().onField( fieldName );
    if ( checkNullToken ) {
      termMatchingContext.ignoreFieldBridge();
    }
    Query query = termMatchingContext.matching( value ).createQuery();
    return fullTextSession.createFullTextQuery( query, MapBridgeTestEntity.class ).list();
  }

  @SuppressWarnings("unchecked")
  private List<MapBridgeTestEntity> findNumericResults(String fieldName, Object number) {
View Full Code Here

        .forEntity( IterableBridgeTestEntity.class ).get();
    TermMatchingContext termMatchingContext = queryBuilder.keyword().onField( fieldName );
    if ( checkRawValue ) {
      termMatchingContext.ignoreFieldBridge();
    }
    Query query = termMatchingContext.matching( value ).createQuery();
    return fullTextSession.createFullTextQuery( query, IterableBridgeTestEntity.class ).list();
  }

  @SuppressWarnings("unchecked")
  private List<IterableBridgeTestEntity> findNumericResults( String fieldName, Object number) {
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.