-
Notifications
You must be signed in to change notification settings - Fork 0
/
models.go
45 lines (34 loc) · 1.02 KB
/
models.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
package es
import (
"github.com/Bnei-Baruch/archive-backend/utils"
)
type EffectiveDate struct {
EffectiveDate *utils.Date `json:"effective_date"`
}
type ResultType struct {
ResultType string `json:"result_type"`
}
type MdbUid struct {
MDB_UID string `json:"mdb_uid"`
}
// For full description see make.py RESULTS TEMPLATE.
type Result struct {
// Document type.
ResultType string `json:"result_type"`
IndexDate *utils.Date `json:"index_date,omitempty"`
MDB_UID string `json:"mdb_uid"`
TypedUids []string `json:"typed_uids"`
FilterValues []string `json:"filter_values"`
// Result content fields.
Title string `json:"title"`
FullTitle string `json:"full_title"`
Description string `json:"description,omitempty"`
Content string `json:"content,omitempty"`
EffectiveDate *utils.Date `json:"effective_date,omitempty"`
// Suggest field for autocomplete.
TitleSuggest SuggestField `json:"title_suggest"`
}
type SuggestField struct {
Input []string `json:"input"`
Weight float64 `json:"weight"`
}