Examples of buildQueryBuilder()


Examples of org.hibernate.search.engine.spi.SearchFactoryImplementor.buildQueryBuilder()

      List<Object> list = qf.getQuery(luceneQuery).list();
      assertEquals(1, list.size());

      // the alternative ....

      QueryBuilder guestQueryBuilder = searchFactory.buildQueryBuilder().forEntity(ProtobufValueWrapper.class).get();
      Query queryAllGuests = guestQueryBuilder
            .keyword()
            .onField("name")
            .ignoreFieldBridge()   //todo [anistor] ignoring the field bridge is a shameless hack!
            .matching("Adrian")
View Full Code Here

Examples of org.hibernate.search.engine.spi.SearchFactoryImplementor.buildQueryBuilder()

      List<Object> list = sm.getQuery(luceneQuery).list();
      assertEquals(1, list.size());

      // an alternative approach ...

      Query luceneQuery2 = searchFactory.buildQueryBuilder().forEntity(ProtobufValueWrapper.class).get()
            .keyword()
            .onField("name")
            .ignoreFieldBridge()
            .ignoreAnalyzer()
            .matching("Adrian")
View Full Code Here

Examples of org.hibernate.search.engine.spi.SearchFactoryImplementor.buildQueryBuilder()

      List<Object> list = sm.getQuery(luceneQuery).list();
      assertEquals(1, list.size());

      // an alternative approach ...

      Query luceneQuery2 = searchFactory.buildQueryBuilder().forEntity(ProtobufValueWrapper.class).get()
            .keyword()
            .onField("name")
            .ignoreFieldBridge()
            .ignoreAnalyzer()
            .matching("Adrian")
View Full Code Here

Examples of org.hibernate.search.engine.spi.SearchFactoryImplementor.buildQueryBuilder()

      TransactionContextForTest tc = new TransactionContextForTest();
      searchFactory.getWorker().performWork( work, tc );
      tc.end();
    }

    QueryBuilder guestQueryBuilder = searchFactory.buildQueryBuilder()
        .forEntity( Guest.class )
        .get();

    Query queryAllGuests = guestQueryBuilder.all().createQuery();
View Full Code Here

Examples of org.hibernate.search.engine.spi.SearchFactoryImplementor.buildQueryBuilder()

      Work work = new Work( book, isbn, WorkType.ADD, false );
      TransactionContextForTest tc = new TransactionContextForTest();
      sf.getWorker().performWork( work, tc );
      tc.end();

      QueryBuilder queryBuilder = sf.buildQueryBuilder()
          .forEntity( Book.class )
          .get();

      Query query = queryBuilder.keyword()
        .onField( fieldName )
View Full Code Here

Examples of org.hibernate.search.engine.spi.SearchFactoryImplementor.buildQueryBuilder()

    storeLog( makeTimestamp( 2013, 10, 7, 10, 10 ), "sync-up with Gunnar and Hardy" );
    storeLog( makeTimestamp( 2013, 10, 7, 10, 20 ), "Checking JIRA state for Hibernate Search release plans" );
    storeLog( makeTimestamp( 2013, 10, 7, 10, 30 ), "Check my Infinispan pull requests from the weekend, cleanup git branches" );
    storeLog( makeTimestamp( 2013, 10, 7, 22, 00 ), "Implementing LogMessageShardingStrategy" );

    QueryBuilder logsQueryBuilder = searchFactory.buildQueryBuilder()
        .forEntity( LogMessage.class )
        .get();

    Query allLogs = logsQueryBuilder.all().createQuery();
View Full Code Here

Examples of org.hibernate.search.engine.spi.SearchFactoryImplementor.buildQueryBuilder()

      TransactionContextForTest tc = new TransactionContextForTest();
      searchFactory.getWorker().performWork( work, tc );
      tc.end();
    }

    QueryBuilder guestQueryBuilder = searchFactory.buildQueryBuilder().forEntity( DynamicIndexedValueHolder.class ).get();

    Query queryAllGuests = guestQueryBuilder.all().createQuery();

    List<EntityInfo> queryEntityInfos = searchFactory.createHSQuery().luceneQuery( queryAllGuests )
        .targetedEntities( Arrays.asList( new Class<?>[] { DynamicIndexedValueHolder.class } ) )
View Full Code Here

Examples of org.hibernate.search.engine.spi.SearchFactoryImplementor.buildQueryBuilder()

    Work work = new Work( book, book.title, WorkType.ADD, false );
    TransactionContextForTest tc = new TransactionContextForTest();
    searchFactory.getWorker().performWork( work, tc );
    tc.end();

    QueryBuilder queryBuilder = searchFactory.buildQueryBuilder().forEntity( Book.class ).get();

    exceptions.expect( EmptyQueryException.class );

    queryBuilder.keyword().onField( "text" ).matching( " " ).createQuery();
    // Hence the answer is: a program won't be able to tell you.
View Full Code Here

Examples of org.hibernate.search.engine.spi.SearchFactoryImplementor.buildQueryBuilder()

      List<Object> list = sm.getQuery(luceneQuery).list();
      assertEquals(1, list.size());

      // an alternative approach ...

      Query luceneQuery2 = searchFactory.buildQueryBuilder().forEntity(ProtobufValueWrapper.class).get()
            .keyword()
            .onField("name")
            .ignoreFieldBridge()
            .ignoreAnalyzer()
            .matching("Adrian")
View Full Code Here

Examples of org.hibernate.search.engine.spi.SearchFactoryImplementor.buildQueryBuilder()

      List<Object> list = sm.getQuery(luceneQuery).list();
      assertEquals(1, list.size());

      // an alternative approach ...

      Query luceneQuery2 = searchFactory.buildQueryBuilder().forEntity(ProtobufValueWrapper.class).get()
            .keyword()
            .onField("name")
            .ignoreFieldBridge()
            .ignoreAnalyzer()
            .matching("Adrian")
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.