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]

1454
1455
1456
1457
# File 'lib/couchbase/search_options.rb', line 1454

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

Instance Attribute Details

#explanationHash

Returns:

  • (Hash)

1441
1442
1443
# File 'lib/couchbase/search_options.rb', line 1441

def explanation
  @explanation
end

#fragmentsHash<String => Array<String>>

Returns:

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

1444
1445
1446
# File 'lib/couchbase/search_options.rb', line 1444

def fragments
  @fragments
end

#idString

Returns document identifier.

Returns:

  • (String)

    document identifier


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

def id
  @id
end

#indexString

Returns name of the index.

Returns:

  • (String)

    name of the index


1429
1430
1431
# File 'lib/couchbase/search_options.rb', line 1429

def index
  @index
end

#locationsSearchRowLocations

Returns:


1438
1439
1440
# File 'lib/couchbase/search_options.rb', line 1438

def locations
  @locations
end

#scoreFloat

Returns:

  • (Float)

1435
1436
1437
# File 'lib/couchbase/search_options.rb', line 1435

def score
  @score
end

#transcoderJsonTranscoder

Returns transcoder to use for the fields.

Returns:


1447
1448
1449
# File 'lib/couchbase/search_options.rb', line 1447

def transcoder
  @transcoder
end

Instance Method Details

#fieldsObject

[View source]

1449
1450
1451
# File 'lib/couchbase/search_options.rb', line 1449

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