Class: Couchbase::Cluster::SearchRow
- Inherits:
-
Object
- Object
- Couchbase::Cluster::SearchRow
- Defined in:
- lib/couchbase/search_options.rb,
/Users/sergey.auseyau/code/couchbase-ruby-client/lib/couchbase/search_options.rb more...
Instance Attribute Summary collapse
- #explanation ⇒ Hash
- #fragments ⇒ Hash<String => Array<String>>
-
#id ⇒ String
Document identifier.
-
#index ⇒ String
Name of the index.
- #locations ⇒ SearchRowLocations
- #score ⇒ Float
-
#transcoder ⇒ JsonTranscoder
Transcoder to use for the fields.
Instance Method Summary collapse
- #fields ⇒ Object
-
#initialize {|self| ... } ⇒ SearchRow
constructor
A new instance of SearchRow.
Constructor Details
#initialize {|self| ... } ⇒ SearchRow
Returns a new instance of SearchRow.
1454 1455 1456 1457 |
# File 'lib/couchbase/search_options.rb', line 1454 def initialize @fields = nil yield self if block_given? end |
Instance Attribute Details
#explanation ⇒ Hash
1441 1442 1443 |
# File 'lib/couchbase/search_options.rb', line 1441 def explanation @explanation end |
#fragments ⇒ Hash<String => Array<String>>
1444 1445 1446 |
# File 'lib/couchbase/search_options.rb', line 1444 def fragments @fragments end |
#id ⇒ String
Returns document identifier.
1432 1433 1434 |
# File 'lib/couchbase/search_options.rb', line 1432 def id @id end |
#index ⇒ String
Returns name of the index.
1429 1430 1431 |
# File 'lib/couchbase/search_options.rb', line 1429 def index @index end |
#locations ⇒ SearchRowLocations
1438 1439 1440 |
# File 'lib/couchbase/search_options.rb', line 1438 def locations @locations end |
#score ⇒ Float
1435 1436 1437 |
# File 'lib/couchbase/search_options.rb', line 1435 def score @score end |
#transcoder ⇒ JsonTranscoder
Returns transcoder to use for the fields.
1447 1448 1449 |
# File 'lib/couchbase/search_options.rb', line 1447 def transcoder @transcoder end |
Instance Method Details
#fields ⇒ Object
[View source]
1449 1450 1451 |
# File 'lib/couchbase/search_options.rb', line 1449 def fields @transcoder.decode(@fields, :json) if @fields && @transcoder end |