mirror of
https://github.com/documize/community.git
synced 2025-07-18 20:59:43 +02:00
Allow sorting of search results and space contents
Closes #187 Sort search results and space contents by Name, Created or Revised.
This commit is contained in:
parent
0985dbf5b6
commit
1d00f8ac6e
19 changed files with 1182 additions and 807 deletions
|
@ -11,6 +11,10 @@
|
|||
|
||||
package search
|
||||
|
||||
import (
|
||||
"time"
|
||||
)
|
||||
|
||||
// QueryOptions defines how we search.
|
||||
type QueryOptions struct {
|
||||
Keywords string `json:"keywords"`
|
||||
|
@ -23,18 +27,20 @@ type QueryOptions struct {
|
|||
|
||||
// QueryResult represents 'presentable' search results.
|
||||
type QueryResult struct {
|
||||
ID string `json:"id"`
|
||||
OrgID string `json:"orgId"`
|
||||
ItemID string `json:"itemId"`
|
||||
ItemType string `json:"itemType"`
|
||||
DocumentID string `json:"documentId"`
|
||||
DocumentSlug string `json:"documentSlug"`
|
||||
Document string `json:"document"`
|
||||
Excerpt string `json:"excerpt"`
|
||||
Tags string `json:"tags"`
|
||||
SpaceID string `json:"spaceId"`
|
||||
Space string `json:"space"`
|
||||
SpaceSlug string `json:"spaceSlug"`
|
||||
Template bool `json:"template"`
|
||||
VersionID string `json:"versionId"`
|
||||
ID string `json:"id"`
|
||||
OrgID string `json:"orgId"`
|
||||
ItemID string `json:"itemId"`
|
||||
ItemType string `json:"itemType"`
|
||||
DocumentID string `json:"documentId"`
|
||||
DocumentSlug string `json:"documentSlug"`
|
||||
Document string `json:"document"`
|
||||
Excerpt string `json:"excerpt"`
|
||||
Tags string `json:"tags"`
|
||||
SpaceID string `json:"spaceId"`
|
||||
Space string `json:"space"`
|
||||
SpaceSlug string `json:"spaceSlug"`
|
||||
Template bool `json:"template"`
|
||||
VersionID string `json:"versionId"`
|
||||
Created time.Time `json:"created"`
|
||||
Revised time.Time `json:"revised"`
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue