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