Class: Couchbase::Cluster::SearchQuery::MatchPhraseQuery
Overview
The input text is analyzed and a phrase query is built with the terms resulting from the analysis.
Instance Attribute Summary collapse
Instance Method Summary
collapse
boolean_field, booleans, conjuncts, date_range, disjuncts, doc_id, geo_bounding_box, geo_distance, geo_polygon, match, match_all, match_none, match_phrase, numeric_range, phrase, prefix, query_string, regexp, term, term_range, wildcard
Constructor Details
#initialize(match_phrase) {|self| ... } ⇒ MatchPhraseQuery
Returns a new instance of MatchPhraseQuery.
[View source]
97
98
99
100
101
|
# File 'lib/couchbase/search_options.rb', line 97
def initialize(match_phrase)
super()
@match_phrase = match_phrase
yield self if block_given?
end
|
Instance Attribute Details
#analyzer ⇒ String
92
93
94
|
# File 'lib/couchbase/search_options.rb', line 92
def analyzer
@analyzer
end
|
#boost ⇒ Float
83
84
85
|
# File 'lib/couchbase/search_options.rb', line 83
def boost
@boost
end
|
#field ⇒ String
89
90
91
|
# File 'lib/couchbase/search_options.rb', line 89
def field
@field
end
|
#operator ⇒ nil, ...
86
87
88
|
# File 'lib/couchbase/search_options.rb', line 86
def operator
@operator
end
|
Instance Method Details
#to_json(*args) ⇒ String
[View source]
104
105
106
107
108
109
110
111
|
# File 'lib/couchbase/search_options.rb', line 104
def to_json(*args)
data = {"match_phrase" => @match_phrase}
data["boost"] = boost if boost
data["operator"] = operator.to_s if operator
data["field"] = field if field
data["analyzer"] = analyzer if analyzer
data.to_json(*args)
end
|