Examples of range()


Examples of org.hibernate.search.query.dsl.QueryBuilder.range()

    calendar.setTimeZone( TimeZone.getTimeZone( "UTC" ) );
    calendar.set( 10 + 1800, 2, 12, 0, 0, 0 );
    Date to = calendar.getTime();

    Query query = monthQb
        .range()
          .onField( "estimatedCreation" )
          .andField( "justfortest" )
            .ignoreFieldBridge().ignoreAnalyzer()
          .below( to )
View Full Code Here

Examples of org.hibernate.search.query.dsl.QueryBuilder.range()

    FullTextQuery hibQuery = fullTextSession.createFullTextQuery( query, Month.class );
    assertEquals( 1, hibQuery.getResultSize() );
    assertEquals( "March", ( (Month) hibQuery.list().get( 0 ) ).getName() );

    query = monthQb
        .range()
          .onField( "estimatedCreation" )
            .ignoreFieldBridge()
          .andField( "justfortest" )
            .ignoreFieldBridge().ignoreAnalyzer()
View Full Code Here

Examples of org.hibernate.search.query.dsl.QueryBuilder.range()

    hibQuery = fullTextSession.createFullTextQuery( query, Month.class );
    assertEquals( 1, hibQuery.getResultSize() );
    assertEquals( "March", ( (Month) hibQuery.list().get( 0 ) ).getName() );

    query = monthQb.range()
        .onField( "raindropInMm" )
        .below( 0.24d )
        .createQuery();

    assertTrue( query.getClass().isAssignableFrom( NumericRangeQuery.class ) );
View Full Code Here

Examples of org.hibernate.search.query.dsl.QueryBuilder.range()

    calendar.setTimeZone( TimeZone.getTimeZone( "UTC" ) );
    calendar.set( 10 + 1900, 2, 12, 0, 0, 0 );
    Date to = calendar.getTime();

    Query query = monthQb
        .range()
          .onField( "estimatedCreation" )
          .andField( "justfortest" )
            .ignoreFieldBridge().ignoreAnalyzer()
          .above( to )
View Full Code Here

Examples of org.hibernate.search.query.dsl.QueryBuilder.range()

          .createQuery();
    FullTextQuery hibQuery = fullTextSession.createFullTextQuery( query, Month.class );
    assertEquals( 1, hibQuery.getResultSize() );
    assertEquals( "February", ( (Month) hibQuery.list().get( 0 ) ).getName() );

    query = monthQb
        .range()
          .onField( "estimatedCreation" )
            .ignoreFieldBridge()
          .andField( "justfortest" )
            .ignoreFieldBridge().ignoreAnalyzer()
View Full Code Here

Examples of org.hibernate.search.query.dsl.QueryBuilder.range()

    hibQuery = fullTextSession.createFullTextQuery( query, Month.class );
    assertEquals( 1, hibQuery.getResultSize() );
    assertEquals( "February", ( (Month) hibQuery.list().get( 0 ) ).getName() );

    // test the limits, inclusive
    query = monthQb
        .range()
          .onField( "estimatedCreation" )
          .andField( "justfortest" )
            .ignoreFieldBridge().ignoreAnalyzer()
          .above( february )
View Full Code Here

Examples of org.hibernate.search.query.dsl.QueryBuilder.range()

    hibQuery = fullTextSession.createFullTextQuery( query, Month.class );
    assertEquals( 1, hibQuery.getResultSize() );
    assertEquals( "February", ( (Month) hibQuery.list().get( 0 ) ).getName() );

    // test the limits, exclusive
    query = monthQb
        .range()
          .onField( "estimatedCreation" )
          .andField( "justfortest" )
            .ignoreFieldBridge().ignoreAnalyzer()
          .above( february ).excludeLimit()
View Full Code Here

Examples of org.hibernate.search.query.dsl.QueryBuilder.range()

  public void testNumericRangeQueries() {
    Transaction transaction = fullTextSession.beginTransaction();
    final QueryBuilder monthQb = fullTextSession.getSearchFactory()
        .buildQueryBuilder().forEntity( Month.class ).get();

    Query query = monthQb
        .range()
          .onField( "raindropInMm" )
          .from( 0.23d )
          .to( 0.24d )
          .createQuery();
View Full Code Here

Examples of org.hibernate.search.query.dsl.QueryBuilder.range()

    Transaction transaction = fullTextSession.beginTransaction();
    final QueryBuilder monthQb = fullTextSession.getSearchFactory()
        .buildQueryBuilder().forEntity( Month.class ).get();

    //inclusive
    Query query = monthQb
        .range()
          .onField( "raindropInMm" )
          .above( 0.231d )
          .createQuery();
View Full Code Here

Examples of org.hibernate.search.query.dsl.QueryBuilder.range()

    List<?> results = fullTextSession.createFullTextQuery( query, Month.class ).list();
    assertThat( results ).onProperty( "name" ).containsOnly( "January", "February", "March" );

    //exclusive
    query = monthQb
        .range()
          .onField( "raindropInMm" )
          .above( 0.231d )
          .excludeLimit()
          .createQuery();
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.