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.
1508 1509 1510 1511 |
# File 'lib/couchbase/search_options.rb', line 1508 def initialize @fields = nil yield self if block_given? end |
Instance Attribute Details
#explanation ⇒ Hash
1495 1496 1497 |
# File 'lib/couchbase/search_options.rb', line 1495 def explanation @explanation end |
#fragments ⇒ Hash<String => Array<String>>
1498 1499 1500 |
# File 'lib/couchbase/search_options.rb', line 1498 def fragments @fragments end |
#id ⇒ String
Returns document identifier.
1486 1487 1488 |
# File 'lib/couchbase/search_options.rb', line 1486 def id @id end |
#index ⇒ String
Returns name of the index.
1483 1484 1485 |
# File 'lib/couchbase/search_options.rb', line 1483 def index @index end |
#locations ⇒ SearchRowLocations
1492 1493 1494 |
# File 'lib/couchbase/search_options.rb', line 1492 def locations @locations end |
#score ⇒ Float
1489 1490 1491 |
# File 'lib/couchbase/search_options.rb', line 1489 def score @score end |
#transcoder ⇒ JsonTranscoder
Returns transcoder to use for the fields.
1501 1502 1503 |
# File 'lib/couchbase/search_options.rb', line 1501 def transcoder @transcoder end |
Instance Method Details
#fields ⇒ Object
[View source]
1503 1504 1505 |
# File 'lib/couchbase/search_options.rb', line 1503 def fields @transcoder.decode(@fields, :json) if @fields && @transcoder end |