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

Examples of org.springframework.data.solr.core.query.StatsOptions.addField()


    }

    StatsOptions options = new StatsOptions();

    for (String fieldName : queryMethod.getFieldStats()) {
      options.addField(fieldName);
    }

    for (String facetFieldName : queryMethod.getStatsFacets()) {
      options.addFacet(facetFieldName);
    }
View Full Code Here


    options.setCalcDistinct(queryMethod.isFieldStatsCountDistinctEnable());

    Collection<String> selectiveCountDistinct = queryMethod.getStatsSelectiveCountDistinctFields();

    for (Entry<String, String[]> selectiveFacet : queryMethod.getStatsSelectiveFacets().entrySet()) {
      FieldStatsOptions fieldStatsOptions = options.addField(selectiveFacet.getKey());
      for (String facetFieldName : selectiveFacet.getValue()) {
        fieldStatsOptions.addSelectiveFacet(facetFieldName);
      }

      fieldStatsOptions.setSelectiveCalcDistinct(selectiveCountDistinct.contains(selectiveFacet.getKey()));
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.