1
0
Fork 0
mirror of https://github.com/anyproto/anytype-heart.git synced 2025-06-09 09:35:00 +09:00

GO-4442 Refactor a bit

This commit is contained in:
Mikhail Iudin 2024-11-14 13:39:12 +01:00
parent bda1dce73a
commit 4b6b06d86a
No known key found for this signature in database
GPG key ID: FAAAA8BAABDFF1C0
11 changed files with 71 additions and 79 deletions

View file

@ -25,12 +25,12 @@ type Record struct {
}
type Query struct {
FullText string
SpaceId string
Filters []*model.BlockContentDataviewFilter // filters results. apply sequentially
Sorts []*model.BlockContentDataviewSort // order results. apply hierarchically
Limit int // maximum number of results
Offset int // skip given number of results
TextQuery string
SpaceId string
Filters []*model.BlockContentDataviewFilter // filters results. apply sequentially
Sorts []*model.BlockContentDataviewSort // order results. apply hierarchically
Limit int // maximum number of results
Offset int // skip given number of results
}
func injectDefaultFilters(filters []*model.BlockContentDataviewFilter) []*model.BlockContentDataviewFilter {
@ -105,7 +105,7 @@ func injectDefaultOrder(qry Query, sorts []*model.BlockContentDataviewSort) []*m
var (
hasScoreSort bool
)
if qry.FullText == "" {
if qry.TextQuery == "" {
return sorts
}