summaryrefslogtreecommitdiffstats
path: root/app/post.go
diff options
context:
space:
mode:
authorChristopher Speller <crspeller@gmail.com>2018-09-26 07:27:04 -0700
committerHarrison Healey <harrisonmhealey@gmail.com>2018-09-26 10:27:04 -0400
commit37e00ef916af9a5aeae760a01fa0a0cf8ca93637 (patch)
tree280c92b115a4614ee74ed4bb0efcaefe9cc8454f /app/post.go
parentbfec808e53772fc79860412cd11c77ca1629739f (diff)
downloadchat-37e00ef916af9a5aeae760a01fa0a0cf8ca93637.tar.gz
chat-37e00ef916af9a5aeae760a01fa0a0cf8ca93637.tar.bz2
chat-37e00ef916af9a5aeae760a01fa0a0cf8ca93637.zip
Adding paging to elasticsearch API. (#9425)
Diffstat (limited to 'app/post.go')
-rw-r--r--app/post.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/app/post.go b/app/post.go
index 9914f6db0..1daad6eea 100644
--- a/app/post.go
+++ b/app/post.go
@@ -622,7 +622,7 @@ func (a *App) DeletePostFiles(post *model.Post) {
}
}
-func (a *App) SearchPostsInTeam(terms string, userId string, teamId string, isOrSearch bool, includeDeletedChannels bool, timeZoneOffset int) (*model.PostSearchResults, *model.AppError) {
+func (a *App) SearchPostsInTeam(terms string, userId string, teamId string, isOrSearch bool, includeDeletedChannels bool, timeZoneOffset int, page, perPage int) (*model.PostSearchResults, *model.AppError) {
paramsList := model.ParseSearchParams(terms, timeZoneOffset)
includeDeleted := includeDeletedChannels && *a.Config().TeamSettings.ExperimentalViewArchivedChannels
@@ -668,7 +668,7 @@ func (a *App) SearchPostsInTeam(terms string, userId string, teamId string, isOr
return nil, err
}
- postIds, matches, err := a.Elasticsearch.SearchPosts(userChannels, finalParamsList)
+ postIds, matches, err := a.Elasticsearch.SearchPosts(userChannels, finalParamsList, page, perPage)
if err != nil {
return nil, err
}