search: browse bounded recent items with kind-only queries
This commit is contained in:
@@ -61,6 +61,8 @@ const (
|
||||
// SearchRequest is the search request body. Query is the free text, a bare
|
||||
// status word or a date expression; Kind optionally narrows to one SearchKind;
|
||||
// Limit caps the returned results (0 = server default).
|
||||
// Blank Query with a valid nonempty Kind browses recent items of that kind;
|
||||
// blank Query with empty Kind remains a no-op. Invalid kinds always fail.
|
||||
type SearchRequest struct {
|
||||
Query string `json:"query"`
|
||||
Kind string `json:"kind,omitempty"`
|
||||
@@ -68,8 +70,10 @@ type SearchRequest struct {
|
||||
}
|
||||
|
||||
// SearchResponse is the ranked, bounded set of matches. Results are ordered by
|
||||
// score, then recency, then a stable kind/target tie-break. Truncated reports
|
||||
// that either the result cap or the field-scan budget dropped matches;
|
||||
// score, then recency, then a stable kind/target tie-break.
|
||||
// For kind-only browsing, order is recency descending, numeric entity/visit IDs
|
||||
// descending, then target ascending, without a text-relevance score.
|
||||
// Truncated reports that either the result cap or the field-scan budget dropped matches;
|
||||
// ScannedSteps/ScannedBytes and ScanBoundBytes make the body-scan bound
|
||||
// observable.
|
||||
type SearchResponse struct {
|
||||
|
||||
Reference in New Issue
Block a user