mirror of
https://github.com/documize/community.git
synced 2025-07-24 07:39:43 +02:00
new search options and schema
This commit is contained in:
parent
6c3042fd4e
commit
2c5f73a486
14 changed files with 283 additions and 118 deletions
|
@ -30,16 +30,27 @@ type Search struct {
|
|||
Body string
|
||||
}
|
||||
|
||||
// DocumentSearch represents 'presentable' search results.
|
||||
type DocumentSearch struct {
|
||||
ID string `json:"id"`
|
||||
DocumentID string `json:"documentId"`
|
||||
DocumentTitle string `json:"documentTitle"`
|
||||
DocumentSlug string `json:"documentSlug"`
|
||||
DocumentExcerpt string `json:"documentExcerpt"`
|
||||
Tags string `json:"documentTags"`
|
||||
PageTitle string `json:"pageTitle"`
|
||||
LabelID string `json:"folderId"`
|
||||
LabelName string `json:"folderName"`
|
||||
FolderSlug string `json:"folderSlug"`
|
||||
// QueryOptions defines how we search.
|
||||
type QueryOptions struct {
|
||||
Keywords string `json:"keywords"`
|
||||
Doc bool `json:"doc"`
|
||||
Tag bool `json:"tag"`
|
||||
Attachment bool `json:"attachment"`
|
||||
Content bool `json:"content"`
|
||||
}
|
||||
|
||||
// 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"`
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue