Class: Couchbase::SearchRow
- Inherits:
-
Object
- Object
- Couchbase::SearchRow
- Defined in:
- lib/couchbase/search_options.rb
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.
1576 1577 1578 1579 |
# File 'lib/couchbase/search_options.rb', line 1576 def initialize @fields = nil yield self if block_given? end |
Instance Attribute Details
#explanation ⇒ Hash
1563 1564 1565 |
# File 'lib/couchbase/search_options.rb', line 1563 def explanation @explanation end |
#fragments ⇒ Hash<String => Array<String>>
1566 1567 1568 |
# File 'lib/couchbase/search_options.rb', line 1566 def fragments @fragments end |
#id ⇒ String
Returns document identifier.
1554 1555 1556 |
# File 'lib/couchbase/search_options.rb', line 1554 def id @id end |
#index ⇒ String
Returns name of the index.
1551 1552 1553 |
# File 'lib/couchbase/search_options.rb', line 1551 def index @index end |
#locations ⇒ SearchRowLocations
1560 1561 1562 |
# File 'lib/couchbase/search_options.rb', line 1560 def locations @locations end |
#score ⇒ Float
1557 1558 1559 |
# File 'lib/couchbase/search_options.rb', line 1557 def score @score end |
#transcoder ⇒ JsonTranscoder
Returns transcoder to use for the fields.
1569 1570 1571 |
# File 'lib/couchbase/search_options.rb', line 1569 def transcoder @transcoder end |
Instance Method Details
#fields ⇒ Object
1571 1572 1573 |
# File 'lib/couchbase/search_options.rb', line 1571 def fields @transcoder.decode(@fields, :json) if @fields && @transcoder end |