Package org.springframework.data.solr.core.query

Examples of org.springframework.data.solr.core.query.StatsOptions$FieldStatsOptions


  /**
   * @see DATASOLR-160
   */
  @Test
  public void testConstructSolrQueryWithSelectiveStatsCountDistinct() {
    StatsOptions statsOptions = new StatsOptions()//
        .addField(new SimpleField("field_1")).setSelectiveCalcDistinct(true) //
        .addField(new SimpleField("field_2")).setSelectiveCalcDistinct(false) //
        .addField(new SimpleField("field_3"));

    SimpleQuery query = new SimpleQuery("*:*");
 
View Full Code Here


  /**
   * @see DATASOLR-160
   */
  @Test
  public void testConstructSolrQueryWithStatsConfig() {
    StatsOptions statsOptions = new StatsOptions()//
        .addField(new SimpleField("field_1"))//
        .addSelectiveFacet(new SimpleField("field_1_1"))//
        .addSelectiveFacet(new SimpleField("field_1_2"))//
        .addField("field_2")//
        .addFacet("field_3");
View Full Code Here

  /**
   * @see DATASOLR-160
   */
  @Test
  public void testQueryWithFieldsStatsAndFaceting() {
    StatsOptions statsOptions = new StatsOptions().addField("price").addFacet("name");
    executeAndCheckStatsRequest(statsOptions);
  }
View Full Code Here

   * @see DATASOLR-160
   */
  @Test
  public void testQueryWithFieldsStatsAndSelectiveFaceting() {

    StatsOptions statsOptions = new StatsOptions().addField("price").addSelectiveFacet("name");
    executeAndCheckStatsRequest(statsOptions);
  }
View Full Code Here

    bean1.setPopularity(2);

    solrTemplate.saveBeans(Arrays.asList(bean1, bean2, bean3));
    solrTemplate.commit();

    StatsOptions statsOptions = new StatsOptions().addField("popularity").addField("price")
        .setSelectiveCalcDistinct(true);

    SimpleQuery statsQuery = new SimpleQuery(new SimpleStringCriteria("*:*"));
    statsQuery.setStatsOptions(statsOptions);
    StatsPage<ExampleSolrBean> statResultPage = solrTemplate.queryForStatsPage(statsQuery, ExampleSolrBean.class);
View Full Code Here

TOP

Related Classes of org.springframework.data.solr.core.query.StatsOptions$FieldStatsOptions

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.