diff --git a/api_logs/api-logs.go b/api_logs/api-logs.go index c569e0ceb3e4935d1370b390973cfa6f0cc8239c..26950b451bd5afbee056eb817b3f815ecb9cf95c 100644 --- a/api_logs/api-logs.go +++ b/api_logs/api-logs.go @@ -147,7 +147,6 @@ type ApiLog struct { Username string `json:"username,omitempty"` SourceIP string `json:"source_ip,omitempty"` //only logged for incoming API UserAgent string `json:"user_agent,omitempty"` //only for incoming, indicate type of browser when UI - RelevantID string `json:"relevant_id,omitempty"` Request ApiLogRequest `json:"request"` Response ApiLogResponse `json:"response"` } diff --git a/search/opensearch_types.go b/search/opensearch_types.go index f46a244280de559408f78d0f9b146548e4ad9991..673ab096f00fa54e2cb605663a87e9fac61c9fe0 100644 --- a/search/opensearch_types.go +++ b/search/opensearch_types.go @@ -37,6 +37,7 @@ type SearchRequestBody struct { Size int64 `json:"size,omitempty"` Query Query `json:"query"` Sort []map[string]string `json:"sort,omitempty"` + From int64 `json:"from,omitempty"` } type Query struct { diff --git a/search/time_series.go b/search/time_series.go index c0eebc196bf2dfc90f29d12ef5cf375ef0715db2..54d56b54e033f7893b558e5e04a9bc7027228f46 100644 --- a/search/time_series.go +++ b/search/time_series.go @@ -40,7 +40,7 @@ type TimeSeries interface { // ... // } // } - Search(query Query, searchQuery []map[string]string, limit int64) (docs map[string]interface{}, totalCount int, err error) + Search(query Query, searchQuery []map[string]string, limit int64, offset int64) (docs map[string]interface{}, totalCount int, err error) // Get takes the id returned in Search() // The id is uuid assigned by OpenSearch when documents are added with Write(). @@ -398,7 +398,7 @@ type IndexSettings struct { //Search //Return: // docs will be a slice of the TimeSeries data type -func (ts *timeSeries) Search(query Query, sortQuery []map[string]string, limit int64) (docs map[string]interface{}, totalCount int, err error) { +func (ts *timeSeries) Search(query Query, sortQuery []map[string]string, limit int64, offset int64) (docs map[string]interface{}, totalCount int, err error) { if ts == nil { return nil, 0, errors.Errorf("time series == nil") } @@ -421,6 +421,7 @@ func (ts *timeSeries) Search(query Query, sortQuery []map[string]string, limit i Size: limit, Query: query, Sort: sortQuery, + From: offset, } jsonBody, _ := json.Marshal(body)