Uploaded image for project: 'Couchbase Server'
  1. Couchbase Server
  2. MB-37816

FTS - Adapt the From/Size checks to benefit from the search_after/before paginations

    XMLWordPrintable

Details

    • Improvement
    • Resolution: Not a Bug
    • Major
    • 7.0.0
    • 6.5.1, 6.6.0
    • fts

    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

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            Sreekanth Sivasankaran Sreekanth Sivasankaran (Inactive)
            Sreekanth Sivasankaran Sreekanth Sivasankaran (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes

                PagerDuty