diff options
author | Christopher Speller <crspeller@gmail.com> | 2018-01-29 14:17:40 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-01-29 14:17:40 -0800 |
commit | 961c04cae992eadb42d286d2f85f8a675bdc68c8 (patch) | |
tree | 3408f2d06f847e966c53485e2d54c692cdd037c1 /vendor/gopkg.in/olivere/elastic.v5/search_queries_more_like_this.go | |
parent | 8d66523ba7d9a77129844be476732ebfd5272d64 (diff) | |
download | chat-961c04cae992eadb42d286d2f85f8a675bdc68c8.tar.gz chat-961c04cae992eadb42d286d2f85f8a675bdc68c8.tar.bz2 chat-961c04cae992eadb42d286d2f85f8a675bdc68c8.zip |
Upgrading server dependancies (#8154)
Diffstat (limited to 'vendor/gopkg.in/olivere/elastic.v5/search_queries_more_like_this.go')
-rw-r--r-- | vendor/gopkg.in/olivere/elastic.v5/search_queries_more_like_this.go | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/vendor/gopkg.in/olivere/elastic.v5/search_queries_more_like_this.go b/vendor/gopkg.in/olivere/elastic.v5/search_queries_more_like_this.go index 40c2d575d..5c71e291f 100644 --- a/vendor/gopkg.in/olivere/elastic.v5/search_queries_more_like_this.go +++ b/vendor/gopkg.in/olivere/elastic.v5/search_queries_more_like_this.go @@ -13,7 +13,7 @@ import "errors" // how the terms should be selected and how the query is formed. // // For more details, see -// https://www.elastic.co/guide/en/elasticsearch/reference/5.2/query-dsl-mlt-query.html +// https://www.elastic.co/guide/en/elasticsearch/reference/6.0/query-dsl-mlt-query.html type MoreLikeThisQuery struct { fields []string docs []*MoreLikeThisQueryItem @@ -25,8 +25,8 @@ type MoreLikeThisQuery struct { stopWords []string minDocFreq *int maxDocFreq *int - minWordLen *int - maxWordLen *int + minWordLength *int + maxWordLength *int boostTerms *float64 boost *float64 analyzer string @@ -147,15 +147,15 @@ func (q *MoreLikeThisQuery) MaxDocFreq(maxDocFreq int) *MoreLikeThisQuery { // MinWordLength sets the minimum word length below which words will be // ignored. It defaults to 0. -func (q *MoreLikeThisQuery) MinWordLen(minWordLen int) *MoreLikeThisQuery { - q.minWordLen = &minWordLen +func (q *MoreLikeThisQuery) MinWordLength(minWordLength int) *MoreLikeThisQuery { + q.minWordLength = &minWordLength return q } -// MaxWordLen sets the maximum word length above which words will be ignored. +// MaxWordLength sets the maximum word length above which words will be ignored. // Defaults to unbounded (0). -func (q *MoreLikeThisQuery) MaxWordLen(maxWordLen int) *MoreLikeThisQuery { - q.maxWordLen = &maxWordLen +func (q *MoreLikeThisQuery) MaxWordLength(maxWordLength int) *MoreLikeThisQuery { + q.maxWordLength = &maxWordLength return q } @@ -254,11 +254,11 @@ func (q *MoreLikeThisQuery) Source() (interface{}, error) { if q.maxDocFreq != nil { params["max_doc_freq"] = *q.maxDocFreq } - if q.minWordLen != nil { - params["min_word_len"] = *q.minWordLen + if q.minWordLength != nil { + params["min_word_length"] = *q.minWordLength } - if q.maxWordLen != nil { - params["max_word_len"] = *q.maxWordLen + if q.maxWordLength != nil { + params["max_word_length"] = *q.maxWordLength } if q.boostTerms != nil { params["boost_terms"] = *q.boostTerms |