Class Group
- java.lang.Object
- 
- com.lucidworks.search.dsl.DslBase
- 
- com.lucidworks.search.dsl.request.DslCloneable
- 
- com.lucidworks.search.dsl.request.Group
 
 
 
- 
 public class Group extends DslCloneable Grouping parametersQueryDefinition.getGroupedQuery()andQueryDefinition.getGroupedFilters()could override main query and filter queries when selecting group details.Note: In order to use these features the documents must be located on the same shard. This could be achieved by restricting data collection to one shard, or by setting up Document Routing on indexing. The same shard restriction could be lifted with hint "hint.grouping.method=group". But getLeaderStrategy(),QueryDefinition.getGroupedQuery()andQueryDefinition.getGroupedFilters()will be ignored; and total number of groups will not be calculated.To calculate total number of group with "hint.grouping.method=group", another hint has to be specified: "hint.grouping.num.found=true", but this will require the documents to be located on the same shard too. 
- 
- 
Constructor SummaryConstructors Constructor Description Group(java.lang.String field, GroupLeaderStrategy leaderStrategy, java.util.List<SortElement> sort, java.lang.Long size)
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description Groupclone()java.lang.StringgetField()GroupLeaderStrategygetLeaderStrategy()java.lang.LonggetSize()java.util.List<SortElement>getSort()voidsetSort(java.util.List<SortElement> sort)- 
Methods inherited from class com.lucidworks.search.dsl.request.DslCloneableclone, deepClone
 
- 
 
- 
- 
- 
Constructor Detail- 
Grouppublic Group(java.lang.String field, GroupLeaderStrategy leaderStrategy, java.util.List<SortElement> sort, java.lang.Long size)
 
- 
 - 
Method Detail- 
getFieldpublic java.lang.String getField() - Returns:
- name of the field that will be used for grouping. Required.
 
 - 
getLeaderStrategypublic GroupLeaderStrategy getLeaderStrategy() - Returns:
- a strategy that is used to determine group head document. If no strategy specified highest scoring document
 is selected as the head document for a group.
 This field is ignored with "hint.grouping.method=group". "sort" leader strategy with getSort()order will be used.
 
 - 
getSortpublic java.util.List<SortElement> getSort() - Returns:
- a sort order for group details
 
 - 
setSortpublic void setSort(java.util.List<SortElement> sort) 
 - 
getSizepublic java.lang.Long getSize() - Returns:
- a number of group details to include. To only return header documents, set to 0. Default is 5.
 
 - 
clonepublic Group clone() - Specified by:
- clonein class- DslCloneable
 
 
- 
 
-