Class: Couchbase::Cluster::SearchRow

Inherits:
Object
  • Object
show all
Defined in:
lib/couchbase/search_options.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

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

Returns a new instance of SearchRow.

Yield Parameters:



1425
1426
1427
1428
# File 'lib/couchbase/search_options.rb', line 1425

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

Instance Attribute Details

#explanationHash

Returns:

  • (Hash)


1412
1413
1414
# File 'lib/couchbase/search_options.rb', line 1412

def explanation
  @explanation
end

#fragmentsHash<String => Array<String>>

Returns:

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


1415
1416
1417
# File 'lib/couchbase/search_options.rb', line 1415

def fragments
  @fragments
end

#idString

Returns document identifier.

Returns:

  • (String)

    document identifier



1403
1404
1405
# File 'lib/couchbase/search_options.rb', line 1403

def id
  @id
end

#indexString

Returns name of the index.

Returns:

  • (String)

    name of the index



1400
1401
1402
# File 'lib/couchbase/search_options.rb', line 1400

def index
  @index
end

#locationsSearchRowLocations

Returns:



1409
1410
1411
# File 'lib/couchbase/search_options.rb', line 1409

def locations
  @locations
end

#scoreFloat

Returns:

  • (Float)


1406
1407
1408
# File 'lib/couchbase/search_options.rb', line 1406

def score
  @score
end

#transcoderJsonTranscoder

Returns transcoder to use for the fields.

Returns:



1418
1419
1420
# File 'lib/couchbase/search_options.rb', line 1418

def transcoder
  @transcoder
end

Instance Method Details

#fieldsObject



1420
1421
1422
# File 'lib/couchbase/search_options.rb', line 1420

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