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:



1548
1549
1550
1551
# File 'lib/couchbase/search_options.rb', line 1548

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

Instance Attribute Details

#explanationHash

Returns:

  • (Hash)


1535
1536
1537
# File 'lib/couchbase/search_options.rb', line 1535

def explanation
  @explanation
end

#fragmentsHash<String => Array<String>>

Returns:

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


1538
1539
1540
# File 'lib/couchbase/search_options.rb', line 1538

def fragments
  @fragments
end

#idString

Returns document identifier.

Returns:

  • (String)

    document identifier



1526
1527
1528
# File 'lib/couchbase/search_options.rb', line 1526

def id
  @id
end

#indexString

Returns name of the index.

Returns:

  • (String)

    name of the index



1523
1524
1525
# File 'lib/couchbase/search_options.rb', line 1523

def index
  @index
end

#locationsSearchRowLocations

Returns:



1532
1533
1534
# File 'lib/couchbase/search_options.rb', line 1532

def locations
  @locations
end

#scoreFloat

Returns:

  • (Float)


1529
1530
1531
# File 'lib/couchbase/search_options.rb', line 1529

def score
  @score
end

#transcoderJsonTranscoder

Returns transcoder to use for the fields.

Returns:



1541
1542
1543
# File 'lib/couchbase/search_options.rb', line 1541

def transcoder
  @transcoder
end

Instance Method Details

#fieldsObject



1543
1544
1545
# File 'lib/couchbase/search_options.rb', line 1543

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