Package org.hibernate.search.query.dsl

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


   }
  
   public void testFaceting() throws Exception {
      QueryBuilder queryBuilder = qf.buildQueryBuilderForClass( Car.class ).get();
     
      FacetingRequest request = queryBuilder.facet()
            .name( facetName )
            .onField( indexFieldName )
            .discrete()
            .createFacetingRequest();
     
View Full Code Here


   }
  
   public void testFaceting() throws Exception {
      QueryBuilder queryBuilder = qf.buildQueryBuilderForClass( Car.class ).get();
     
      FacetingRequest request = queryBuilder.facet()
            .name( facetName )
            .onField( indexFieldName )
            .discrete()
            .createFacetingRequest();
     
View Full Code Here

   }
  
   public void testFaceting() throws Exception {
      QueryBuilder queryBuilder = qf.buildQueryBuilderForClass( Car.class ).get();
     
      FacetingRequest request = queryBuilder.facet()
            .name( facetName )
            .onField( indexFieldName )
            .discrete()
            .createFacetingRequest();
     
View Full Code Here

      // build a Lucene query
      final Query query = builder.keyword().onField( "make" ).matching( queryString ).createQuery();

      // create facets for navigation
      // discrete faceting
      final FacetingRequest colorFacet = builder.facet()
          .name( colorFacetName )
          .onField( "color" )
          .discrete()
          .createFacetingRequest();
      // range faceting
View Full Code Here

          .name( colorFacetName )
          .onField( "color" )
          .discrete()
          .createFacetingRequest();
      // range faceting
      final FacetingRequest priceFacet = builder.facet()
          .name( cubicCapacityFacetName )
          .onField( "cubicCapacity" )
          .range()
          .below( 2500 ).excludeLimit()
          .from( 2500 ).to( 3000 )
View Full Code Here

    FullTextSession fullTextSession = Search.getFullTextSession( openSession() );

    FullTextQuery fullTextQuery = fullTextSession.createFullTextQuery( new MatchAllDocsQuery(), Book.class );

    QueryBuilder builder = fullTextSession.getSearchFactory().buildQueryBuilder().forEntity( Book.class ).get();
    FacetingRequest facetReq = builder.facet()
        .name( "someFacet" )
        .onField( "authors.name_untokenized" )
        .discrete()
        .orderedBy( FacetSortOrder.COUNT_DESC )
        .includeZeroCounts( false ).maxFacetCount( 10 )
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
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.