Class: Couchbase::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:



1576
1577
1578
1579
# File 'lib/couchbase/search_options.rb', line 1576

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

Instance Attribute Details

#explanationHash

Returns:

  • (Hash)


1563
1564
1565
# File 'lib/couchbase/search_options.rb', line 1563

def explanation
  @explanation
end

#fragmentsHash<String => Array<String>>

Returns:

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


1566
1567
1568
# File 'lib/couchbase/search_options.rb', line 1566

def fragments
  @fragments
end

#idString

Returns document identifier.

Returns:

  • (String)

    document identifier



1554
1555
1556
# File 'lib/couchbase/search_options.rb', line 1554

def id
  @id
end

#indexString

Returns name of the index.

Returns:

  • (String)

    name of the index



1551
1552
1553
# File 'lib/couchbase/search_options.rb', line 1551

def index
  @index
end

#locationsSearchRowLocations

Returns:



1560
1561
1562
# File 'lib/couchbase/search_options.rb', line 1560

def locations
  @locations
end

#scoreFloat

Returns:

  • (Float)


1557
1558
1559
# File 'lib/couchbase/search_options.rb', line 1557

def score
  @score
end

#transcoderJsonTranscoder

Returns transcoder to use for the fields.

Returns:



1569
1570
1571
# File 'lib/couchbase/search_options.rb', line 1569

def transcoder
  @transcoder
end

Instance Method Details

#fieldsObject



1571
1572
1573
# File 'lib/couchbase/search_options.rb', line 1571

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