Details
-
Improvement
-
Resolution: Not a Bug
-
Major
-
6.5.1, 6.6.0
Description
With the rigid checks around From and Size, we aren't reaping the benefits of exposing the search_after/search_before deeper pagination features.
Whenever the search_after/before sort keys are passed in, bleveMaxResultWindow needs to be checked only against the `Size/Limit` as the `From/Offset` part is already skipped under the hood to result in lower memory requirements.
PR: https://github.com/blevesearch/bleve/pull/1182
The new SearchRequest ..
type SearchRequest struct {
|
Q json.RawMessage `json:"query"` |
Size *int `json:"size"` |
From *int `json:"from"` |
Highlight *bleve.HighlightRequest `json:"highlight"` |
Fields []string `json:"fields"` |
Facets bleve.FacetsRequest `json:"facets"` |
Explain bool `json:"explain"` |
Sort []json.RawMessage `json:"sort"` |
IncludeLocations bool `json:"includeLocations"` |
Score string `json:"score,omitempty"` |
SearchAfter []string `json:"search_after,omitempty"` |
SearchBefore []string `json:"search_before,omitempty"` |
Limit *int `json:"limit,omitempty"` |
Offset *int `json:"offset,omitempty"` |
Collections []string `json:"collections,omitempty"` |
}
|
More details in the description here: https://issues.couchbase.com/browse/CBD-3580