code: func (q *SearchQuery) setResultContinue(corpus *index.Corpus, res *SearchResult) {
  	if !q.Constraint.onlyMatchesPermanode() {
  		return
  	}
  	var pnTimeFunc func(blob.Ref) (t time.Time, ok bool)
  	switch q.Sort {
  	case LastModifiedDesc:
  		pnTimeFunc = corpus.PermanodeModtime
  	case CreatedDesc:
  		pnTimeFunc = corpus.PermanodeAnyTime
  	default:
  		return
  	}
  
  	if q.Limit <= 0 || len(res.Blobs) != q.Limit {
  		return
  	}
  	lastpn := res.Blobs[len(res.Blobs)-1].Blob
  	t, ok := pnTimeFunc(lastpn)
  	if !ok {
  		return
  	}
  	res.Continue = fmt.Sprintf("pn:%d:%v", t.UnixNano(), lastpn)
  }
docs: // setResultContinue sets res.Continue if q is suitable for having a continue token.
  // The corpus is locked for reads.