summaryrefslogtreecommitdiffstats
path: root/vendor/gopkg.in/olivere/elastic.v5/search_queries_common_terms.go
diff options
context:
space:
mode:
authorChristopher Speller <crspeller@gmail.com>2018-04-16 05:37:14 -0700
committerJoram Wilander <jwawilander@gmail.com>2018-04-16 08:37:14 -0400
commit6e2cb00008cbf09e556b00f87603797fcaa47e09 (patch)
tree3c0eb55ff4226a3f024aad373140d1fb860a6404 /vendor/gopkg.in/olivere/elastic.v5/search_queries_common_terms.go
parentbf24f51c4e1cc6286885460672f7f449e8c6f5ef (diff)
downloadchat-6e2cb00008cbf09e556b00f87603797fcaa47e09.tar.gz
chat-6e2cb00008cbf09e556b00f87603797fcaa47e09.tar.bz2
chat-6e2cb00008cbf09e556b00f87603797fcaa47e09.zip
Depenancy upgrades and movign to dep. (#8630)
Diffstat (limited to 'vendor/gopkg.in/olivere/elastic.v5/search_queries_common_terms.go')
-rw-r--r--vendor/gopkg.in/olivere/elastic.v5/search_queries_common_terms.go11
1 files changed, 10 insertions, 1 deletions
diff --git a/vendor/gopkg.in/olivere/elastic.v5/search_queries_common_terms.go b/vendor/gopkg.in/olivere/elastic.v5/search_queries_common_terms.go
index 93a03de54..a1a37b37c 100644
--- a/vendor/gopkg.in/olivere/elastic.v5/search_queries_common_terms.go
+++ b/vendor/gopkg.in/olivere/elastic.v5/search_queries_common_terms.go
@@ -8,7 +8,7 @@ package elastic
// which improves the precision and recall of search results
// (by taking stopwords into account), without sacrificing performance.
// For more details, see:
-// https://www.elastic.co/guide/en/elasticsearch/reference/6.0/query-dsl-common-terms-query.html
+// https://www.elastic.co/guide/en/elasticsearch/reference/5.2/query-dsl-common-terms-query.html
type CommonTermsQuery struct {
Query
name string
@@ -22,6 +22,7 @@ type CommonTermsQuery struct {
lowFreqMinimumShouldMatch string
analyzer string
boost *float64
+ disableCoord *bool
queryName string
}
@@ -75,6 +76,11 @@ func (q *CommonTermsQuery) Boost(boost float64) *CommonTermsQuery {
return q
}
+func (q *CommonTermsQuery) DisableCoord(disableCoord bool) *CommonTermsQuery {
+ q.disableCoord = &disableCoord
+ return q
+}
+
func (q *CommonTermsQuery) QueryName(queryName string) *CommonTermsQuery {
q.queryName = queryName
return q
@@ -126,6 +132,9 @@ func (q *CommonTermsQuery) Source() (interface{}, error) {
if q.analyzer != "" {
query["analyzer"] = q.analyzer
}
+ if q.disableCoord != nil {
+ query["disable_coord"] = *q.disableCoord
+ }
if q.boost != nil {
query["boost"] = *q.boost
}