Examples of addGroupByFunction()


Examples of org.springframework.data.solr.core.query.GroupOptions.addGroupByFunction()

    SimpleQuery groupQuery = new SimpleQuery(new SimpleStringCriteria("*:*"));
    GroupOptions groupOptions = new GroupOptions();
    groupQuery.setGroupOptions(groupOptions);
    groupOptions.addSort(new Sort("name", "id"));
    groupOptions.addGroupByField("name");
    groupOptions.addGroupByFunction(f);
    groupOptions.addGroupByQuery(q1);
    groupOptions.addGroupByQuery(q2);
    groupOptions.setLimit(2);

    // asserts result page
View Full Code Here

Examples of org.springframework.data.solr.core.query.GroupOptions.addGroupByFunction()

    query.addCriteria(new SimpleStringCriteria("*:*"));
    query.setGroupOptions(groupOptions);
    groupOptions.setOffset(1);
    groupOptions.setLimit(2);
    groupOptions.addGroupByField("field_1");
    groupOptions.addGroupByFunction(MaxFunction.max("field_1", "field_2"));
    groupOptions.addGroupByQuery(new SimpleQuery("*:*"));
    groupOptions.addSort(new Sort(Sort.Direction.DESC, "field_3"));
    groupOptions.setTotalCount(true);

    SolrQuery solrQuery = queryParser.constructSolrQuery(query);
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.