Class: Couchbase::SearchRow
- Inherits:
-
Object
- Object
- Couchbase::SearchRow
- Defined in:
- lib/couchbase/search_options.rb,
/home/runner/work/couchbase-ruby-client/couchbase-ruby-client/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.
1670 1671 1672 1673 |
# File 'lib/couchbase/search_options.rb', line 1670 def initialize @fields = nil yield self if block_given? end |
Instance Attribute Details
#explanation ⇒ Hash
1657 1658 1659 |
# File 'lib/couchbase/search_options.rb', line 1657 def explanation @explanation end |
#fragments ⇒ Hash<String => Array<String>>
1660 1661 1662 |
# File 'lib/couchbase/search_options.rb', line 1660 def fragments @fragments end |
#id ⇒ String
Returns document identifier.
1648 1649 1650 |
# File 'lib/couchbase/search_options.rb', line 1648 def id @id end |
#index ⇒ String
Returns name of the index.
1645 1646 1647 |
# File 'lib/couchbase/search_options.rb', line 1645 def index @index end |
#locations ⇒ SearchRowLocations
1654 1655 1656 |
# File 'lib/couchbase/search_options.rb', line 1654 def locations @locations end |
#score ⇒ Float
1651 1652 1653 |
# File 'lib/couchbase/search_options.rb', line 1651 def score @score end |
#transcoder ⇒ JsonTranscoder
Returns transcoder to use for the fields.
1663 1664 1665 |
# File 'lib/couchbase/search_options.rb', line 1663 def transcoder @transcoder end |
Instance Method Details
#fields ⇒ Object
1665 1666 1667 |
# File 'lib/couchbase/search_options.rb', line 1665 def fields @transcoder.decode(@fields, :json) if @fields && @transcoder end |