Package org.hibernate.search.query.facet

Examples of org.hibernate.search.query.facet.FacetingRequest


    assertEquals( "[1.51, 3.0]", facets.get( 2 ).getValue() );
  }

  @Test
  public void testRangeQueryRangeDefOrderHigherMaxCount() {
    FacetingRequest rangeRequest = queryBuilder( Fruit.class ).facet()
        .name( priceRange )
        .onField( indexFieldName )
        .range()
        .from( 0.00 ).to( 1.00 )
        .from( 1.01 ).to( 1.50 )
View Full Code Here


  @Test
  public void testStringRangeFaceting() {
    final String facetingName = "albumNameFaceting";
    final String fieldName = "name_un_analyzed";
    FacetingRequest rangeRequest = queryBuilder( Cd.class ).facet()
        .name( facetingName )
        .onField( fieldName )
        .range()
        .below( "S" ).excludeLimit()
        .from( "S" ).to( "U" )
View Full Code Here

  @Test
  public void testDateRangeFaceting() throws Exception {
    final String facetingName = "albumYearFaceting";
    final String fieldName = "releaseYear";
    final DateFormat formatter = new SimpleDateFormat( "yyyy" );
    FacetingRequest rangeRequest = queryBuilder( Cd.class ).facet()
        .name( facetingName )
        .onField( fieldName )
        .range()
        .below( formatter.parse( "1970" ) ).excludeLimit()
        .from( formatter.parse( "1970" ) ).to( formatter.parse( "1979" ) )
View Full Code Here

      FacetManager facetManager = hibQuery.getFacetManager();

      QueryBuilder queryBuilder = fullTextSession.getSearchFactory().buildQueryBuilder().forEntity( POI.class ).get();

      FacetingRequest facetingRequest = queryBuilder.facet()
          .name( "typeFacet" )
          .onField( "type" )
          .discrete()
          .orderedBy( FacetSortOrder.COUNT_DESC )
          .includeZeroCounts( false )
View Full Code Here

TOP

Related Classes of org.hibernate.search.query.facet.FacetingRequest

Copyright © 2018 www.massapicom. 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.