Examples of facet()


Examples of org.elasticsearch.search.builder.SearchSourceBuilder.facet()

            termsFacetBuilder.order(TermsFacet.ComparatorType.TERM);
          } else {
            termsFacetBuilder.order(TermsFacet.ComparatorType.COUNT);
          }

          searchSourceBuilder.facet(termsFacetBuilder);
        }
      }

      if (facetQueries != null && !facetQueries.isEmpty()) {
        for (String facetQuery : facetQueries) {
View Full Code Here

Examples of org.elasticsearch.search.builder.SearchSourceBuilder.facet()

      if (facetQueries != null && !facetQueries.isEmpty()) {
        for (String facetQuery : facetQueries) {
          QueryFacetBuilder queryFacetBuilder = new QueryFacetBuilder(facetQuery);
          queryFacetBuilder.query(QueryBuilders.queryString(facetQuery));
          searchSourceBuilder.facet(queryFacetBuilder);
        }
      }
    }

    // get index and type we want to search against
View Full Code Here

Examples of org.elasticsearch.search.builder.SearchSourceBuilder.facet()

            termsFacetBuilder.order(TermsFacet.ComparatorType.TERM);
          } else {
            termsFacetBuilder.order(TermsFacet.ComparatorType.COUNT);
          }

          searchSourceBuilder.facet(termsFacetBuilder);
        }
      }

      if (facetQueries != null && !facetQueries.isEmpty()) {
        for (String facetQuery : facetQueries) {
View Full Code Here

Examples of org.elasticsearch.search.builder.SearchSourceBuilder.facet()

      if (facetQueries != null && !facetQueries.isEmpty()) {
        for (String facetQuery : facetQueries) {
          QueryFacetBuilder queryFacetBuilder = new QueryFacetBuilder(facetQuery);
          queryFacetBuilder.query(QueryBuilders.queryString(facetQuery));
          searchSourceBuilder.facet(queryFacetBuilder);
        }
      }
    }

    // Build the search Request
View Full Code Here

Examples of org.elasticsearch.search.facet.Facets.facet()

        public void checkResults(final SearchResponse myResponse) throws IOException {
            _response = myResponse;
            final Facets facets = myResponse.getFacets();
            assertEquals("Found " + facets.facets().size() + " facets instead of 1", 1, facets.facets().size());
            final Facet facet = facets.facet(_facetName);
            assertEquals(queryType(), facet.getType());
            checkEntries(facet);
            checkHeaders(facet);
        }
View Full Code Here

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

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

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

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

      // 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

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

          .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
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.