Class: Couchbase::SearchSort

Inherits:
Object
  • Object
show all
Defined in:
lib/couchbase/search_options.rb

Defined Under Namespace

Classes: SearchSortField, SearchSortGeoDistance, SearchSortId, SearchSortScore

Class Method Summary collapse

Class Method Details

.field(name) {|| ... } ⇒ SearchSortField

Parameters:

  • name (String)

    field name

Yield Parameters:

Returns:



1147
1148
1149
# File 'lib/couchbase/search_options.rb', line 1147

def self.field(name, &)
  SearchSortField.new(name, &)
end

.geo_distance(name, longitude, latitude) {|| ... } ⇒ SearchSortGeoDistance

Parameters:

  • name (String)

    field name

  • longitude (Float)
  • latitude (Float)

Yield Parameters:

Returns:



1156
1157
1158
# File 'lib/couchbase/search_options.rb', line 1156

def self.geo_distance(name, longitude, latitude, &)
  SearchSortGeoDistance.new(name, longitude, latitude, &)
end

.id {|| ... } ⇒ SearchSortScore

Yield Parameters:

Returns:



1140
1141
1142
# File 'lib/couchbase/search_options.rb', line 1140

def self.id(&)
  SearchSortId.new(&)
end

.score {|| ... } ⇒ SearchSortScore

Yield Parameters:

Returns:



1134
1135
1136
# File 'lib/couchbase/search_options.rb', line 1134

def self.score(&)
  SearchSortScore.new(&)
end