Class: Couchbase::SearchQuery::MatchQuery
Overview
A match query analyzes the input text and uses that analyzed text to query the index.
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, #to_json, wildcard
Constructor Details
#initialize(match) {|self| ... } ⇒ MatchQuery
Returns a new instance of MatchQuery.
[View source]
121
122
123
124
125
|
# File 'lib/couchbase/search_options.rb', line 121
def initialize(match)
super()
@match = match
yield self if block_given?
end
|
Instance Attribute Details
#analyzer ⇒ String
108
109
110
|
# File 'lib/couchbase/search_options.rb', line 108
def analyzer
@analyzer
end
|
#boost ⇒ Float
102
103
104
|
# File 'lib/couchbase/search_options.rb', line 102
def boost
@boost
end
|
#field ⇒ String
105
106
107
|
# File 'lib/couchbase/search_options.rb', line 105
def field
@field
end
|
#fuzziness ⇒ Integer
114
115
116
|
# File 'lib/couchbase/search_options.rb', line 114
def fuzziness
@fuzziness
end
|
#operator ⇒ nil, ...
117
118
119
|
# File 'lib/couchbase/search_options.rb', line 117
def operator
@operator
end
|
#prefix_length ⇒ Integer
111
112
113
|
# File 'lib/couchbase/search_options.rb', line 111
def prefix_length
@prefix_length
end
|
Instance Method Details
#to_h ⇒ Hash<Symbol, #to_json>
[View source]
128
129
130
131
132
133
134
135
136
137
|
# File 'lib/couchbase/search_options.rb', line 128
def to_h
data = {:match => @match}
data[:boost] = boost if boost
data[:field] = field if field
data[:analyzer] = analyzer if analyzer
data[:operator] = operator if operator
data[:fuzziness] = fuzziness if fuzziness
data[:prefix_length] = prefix_length if prefix_length
data
end
|