Class: Couchbase::Cluster::SearchRow

Inherits:
Object
  • Object
show all
Defined in:
lib/couchbase/search_options.rb,
/Users/sergey.auseyau/code/couchbase-ruby-client/lib/couchbase/search_options.rb
more...

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize {|self| ... } ⇒ SearchRow

Returns a new instance of SearchRow.

Yield Parameters:

[View source]

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

#explanationHash

Returns:

  • (Hash)

1495
1496
1497
# File 'lib/couchbase/search_options.rb', line 1495

def explanation
  @explanation
end

#fragmentsHash<String => Array<String>>

Returns:

  • (Hash<String => Array<String>>)

1498
1499
1500
# File 'lib/couchbase/search_options.rb', line 1498

def fragments
  @fragments
end

#idString

Returns document identifier.

Returns:

  • (String)

    document identifier


1486
1487
1488
# File 'lib/couchbase/search_options.rb', line 1486

def id
  @id
end

#indexString

Returns name of the index.

Returns:

  • (String)

    name of the index


1483
1484
1485
# File 'lib/couchbase/search_options.rb', line 1483

def index
  @index
end

#locationsSearchRowLocations

Returns:


1492
1493
1494
# File 'lib/couchbase/search_options.rb', line 1492

def locations
  @locations
end

#scoreFloat

Returns:

  • (Float)

1489
1490
1491
# File 'lib/couchbase/search_options.rb', line 1489

def score
  @score
end

#transcoderJsonTranscoder

Returns transcoder to use for the fields.

Returns:


1501
1502
1503
# File 'lib/couchbase/search_options.rb', line 1501

def transcoder
  @transcoder
end

Instance Method Details

#fieldsObject

[View source]

1503
1504
1505
# File 'lib/couchbase/search_options.rb', line 1503

def fields
  @transcoder.decode(@fields, :json) if @fields && @transcoder
end