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:



1431
1432
1433
1434
# File 'lib/couchbase/search_options.rb', line 1431

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

Instance Attribute Details

#explanationHash

Returns:

  • (Hash)


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

def explanation
  @explanation
end

#fragmentsHash<String => Array<String>>

Returns:

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


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

def fragments
  @fragments
end

#idString

Returns document identifier.

Returns:

  • (String)

    document identifier



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

def id
  @id
end

#indexString

Returns name of the index.

Returns:

  • (String)

    name of the index



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

def index
  @index
end

#locationsSearchRowLocations

Returns:



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

def locations
  @locations
end

#scoreFloat

Returns:

  • (Float)


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

def score
  @score
end

#transcoderJsonTranscoder

Returns transcoder to use for the fields.

Returns:



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

def transcoder
  @transcoder
end

Instance Method Details

#fieldsObject



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

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