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]

1509
1510
1511
1512
# File 'lib/couchbase/search_options.rb', line 1509

def initialize
  @fields = nil
  yield self if block_given?
end

Instance Attribute Details

#explanationHash

Returns:

  • (Hash)

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

def explanation
  @explanation
end

#fragmentsHash<String => Array<String>>

Returns:

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

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

def fragments
  @fragments
end

#idString

Returns document identifier.

Returns:

  • (String)

    document identifier


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

def id
  @id
end

#indexString

Returns name of the index.

Returns:

  • (String)

    name of the index


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

def index
  @index
end

#locationsSearchRowLocations

Returns:


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

def locations
  @locations
end

#scoreFloat

Returns:

  • (Float)

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

def score
  @score
end

#transcoderJsonTranscoder

Returns transcoder to use for the fields.

Returns:


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

def transcoder
  @transcoder
end

Instance Method Details

#fieldsObject

[View source]

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

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