Skip to content

Commit 4b4803f

Browse files
committed
rf: implement all neccessary methods in rollup Search
1 parent 0ba0f72 commit 4b4803f

1 file changed

Lines changed: 35 additions & 0 deletions

File tree

rollup_search.go

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,41 @@ func (s *RollupSearchService) Index(index ...string) ElasticSearchService {
3535
return s
3636
}
3737

38+
func (s *RollupSearchService) FetchSourceContext(fetchSourceContext *FetchSourceContext) ElasticSearchService {
39+
s.searchSource = s.searchSource.FetchSourceContext(fetchSourceContext)
40+
return s
41+
}
42+
43+
func (s *RollupSearchService) Query(query Query) ElasticSearchService {
44+
s.searchSource = s.searchSource.Query(query)
45+
return s
46+
}
47+
48+
func (s *RollupSearchService) SortWithInfo(info SortInfo) ElasticSearchService {
49+
s.searchSource = s.searchSource.SortWithInfo(info)
50+
return s
51+
}
52+
53+
func (s *RollupSearchService) From(from int) ElasticSearchService {
54+
s.searchSource = s.searchSource.From(from)
55+
return s
56+
}
57+
58+
func (s *RollupSearchService) Size(size int) ElasticSearchService {
59+
s.searchSource = s.searchSource.Size(size)
60+
return s
61+
}
62+
63+
func (s *RollupSearchService) Aggregation(name string, aggregation Aggregation) ElasticSearchService {
64+
s.searchSource = s.searchSource.Aggregation(name, aggregation)
65+
return s
66+
}
67+
68+
func (s *RollupSearchService) Pretty(pretty bool) ElasticSearchService {
69+
s.pretty = &pretty
70+
return s
71+
}
72+
3873
// buildURL builds the URL for the operation.
3974
func (s *RollupSearchService) BuildURL() (string, url.Values, error) {
4075
var err error

0 commit comments

Comments
 (0)