forked from ravendb/ravendb-go-client
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmore_like_this_options.go
82 lines (66 loc) · 3.04 KB
/
more_like_this_options.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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
package ravendb
import "math"
const (
MoreLikeThisOptionsDefaultMaximumNumberOfTokensParsed = 5000
MoreLikeThisOptionsDefaultMinimumTermFrequency = 2
MoreLikeThisOptionsDefaultMinimumDocumentFrequency = 5
MoreLikeThisOptionsDefaultMaximumDocumentFrequence = math.MaxInt32
MoreLikeThisOptionsDefaultBoost = false
MoreLikeThisOptionsDefaultBoostFactor = 1
MoreLikeThisOptionsDefaultMinimumWordLength = 0
MoreLikeThisOptionsDefaultMaximumWordLength = 0
MoreLikeThisOptionsDefaultMaximumQueryTerms = 25
)
var (
defaultMoreLikeThisOptions = &MoreLikeThisOptions{}
)
type MoreLikeThisOptions struct {
MinimumTermFrequency *int `json:"MinimumTermFrequency"`
MaximumQueryTerms *int `json:"MaximumQueryTerms"`
MaximumNumberOfTokensParsed *int `json:"MaximumNumberOfTokensParsed"`
MinimumWordLength *int `json:"MinimumWordLength"`
MaximumWordLength *int `json:"MaximumWordLength"`
MinimumDocumentFrequency *int `json:"MinimumDocumentFrequency"`
MaximumDocumentFrequency *int `json:"MaximumDocumentFrequency"`
MaximumDocumentFrequencyPercentage *int `json:"MaximumDocumentFrequencyPercentage"`
Boost *bool `json:"Boost"`
BoostFactor *float32 `json:"BoostFactor"`
StopWordsDocumentID *string `json:"StopWordsDocumentId"`
Fields []string `json:"Fields"`
}
func NewMoreLikeThisOptions() *MoreLikeThisOptions {
return &MoreLikeThisOptions{}
}
func (o *MoreLikeThisOptions) SetMinimumTermFrequency(minimumTermFrequency int) {
o.MinimumTermFrequency = &minimumTermFrequency
}
func (o *MoreLikeThisOptions) SetMaximumQueryTerms(maximumQueryTerms int) {
o.MaximumQueryTerms = &maximumQueryTerms
}
func (o *MoreLikeThisOptions) SetMaximumNumberOfTokensParsed(maximumNumberOfTokensParsed int) {
o.MaximumNumberOfTokensParsed = &maximumNumberOfTokensParsed
}
func (o *MoreLikeThisOptions) SetMinimumWordLength(minimumWordLength int) {
o.MinimumWordLength = &minimumWordLength
}
func (o *MoreLikeThisOptions) SetMaximumWordLength(maximumWordLength int) {
o.MaximumWordLength = &maximumWordLength
}
func (o *MoreLikeThisOptions) SetMinimumDocumentFrequency(minimumDocumentFrequency int) {
o.MinimumDocumentFrequency = &minimumDocumentFrequency
}
func (o *MoreLikeThisOptions) SetMaximumDocumentFrequency(maximumDocumentFrequency int) {
o.MaximumDocumentFrequency = &maximumDocumentFrequency
}
func (o *MoreLikeThisOptions) SetMaximumDocumentFrequencyPercentage(maximumDocumentFrequencyPercentage int) {
o.MaximumDocumentFrequencyPercentage = &maximumDocumentFrequencyPercentage
}
func (o *MoreLikeThisOptions) SetBoost(boost bool) {
o.Boost = &boost
}
func (o *MoreLikeThisOptions) SetBoostFactor(boostFactor float32) {
o.BoostFactor = &boostFactor
}
func (o *MoreLikeThisOptions) SetStopWordsDocumentID(stopWordsDocumentID string) {
o.StopWordsDocumentID = &stopWordsDocumentID
}