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:



1581
1582
1583
1584
# File 'lib/couchbase/search_options.rb', line 1581

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

Instance Attribute Details

#explanationHash

Returns:

  • (Hash)


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

def explanation
  @explanation
end

#fragmentsHash<String => Array<String>>

Returns:

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


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

def fragments
  @fragments
end

#idString

Returns document identifier.

Returns:

  • (String)

    document identifier



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

def id
  @id
end

#indexString

Returns name of the index.

Returns:

  • (String)

    name of the index



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

def index
  @index
end

#locationsSearchRowLocations

Returns:



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

def locations
  @locations
end

#scoreFloat

Returns:

  • (Float)


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

def score
  @score
end

#transcoderJsonTranscoder

Returns transcoder to use for the fields.

Returns:



1574
1575
1576
# File 'lib/couchbase/search_options.rb', line 1574

def transcoder
  @transcoder
end

Instance Method Details

#fieldsObject



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

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