Class Group
- java.lang.Object
-
- co.elasticsearch.enterprisesearch.client.model.request.search.Group
-
public class Group extends Object
Represents a Search Request Group
-
-
Constructor Summary
Constructors Constructor Description Group()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected booleancanEqual(Object other)booleanequals(Object o)BooleangetCollapse()Experimental.StringgetField()Field name to group results on.IntegergetSize()Number of results to be included in the _group key of the returned document.SortgetSort()A JSON object containing the field name or _score as the key and the value as asc or desc.inthashCode()GroupsetCollapse(Boolean collapse)Experimental.GroupsetField(String field)Field name to group results on.GroupsetSize(Integer size)Number of results to be included in the _group key of the returned document.GroupsetSort(Sort sort)A JSON object containing the field name or _score as the key and the value as asc or desc.StringtoString()
-
-
-
Method Detail
-
getField
public String getField()
Field name to group results on.- Returns:
- The field
-
getSize
public Integer getSize()
Number of results to be included in the _group key of the returned document. Can be between 1 and 10. Defaults to 10.- Returns:
- the size
-
getSort
public Sort getSort()
A JSON object containing the field name or _score as the key and the value as asc or desc. The default sort is by descending relevance.- Returns:
- the sort
-
getCollapse
public Boolean getCollapse()
Experimental. Provides Paging and Sorting support. The field you are grouping on must not have multiple values. Multiple values will cause an error.- Returns:
- collapse is enabled
-
setField
public Group setField(String field)
Field name to group results on.- Parameters:
field- Field name to group results on.- Returns:
this.
-
setSize
public Group setSize(Integer size)
Number of results to be included in the _group key of the returned document. Can be between 1 and 10. Defaults to 10.- Parameters:
size- number of results to be included in the _group key- Returns:
this.
-
setSort
public Group setSort(Sort sort)
A JSON object containing the field name or _score as the key and the value as asc or desc. The default sort is by descending relevance.- Parameters:
sort- a sort field- Returns:
this.
-
setCollapse
public Group setCollapse(Boolean collapse)
Experimental. Provides Paging and Sorting support. The field you are grouping on must not have multiple values. Multiple values will cause an error.- Parameters:
collapse- Whether to enable paging and sorting- Returns:
this.
-
canEqual
protected boolean canEqual(Object other)
-
-