module Restforce::Concerns::API

def search(sosl)

Returns an Array of Hash for each record in the result if Restforce.configuration.mashify is false.
Returns a Restforce::Collection if Restforce.configuration.mashify is true.

# => ['GenePoint']
client.search('FIND {genepoint} RETURNING Account (Name)').map(&:Name)
# Find accounts match the term 'genepoint' and return the Name field

# => #
client.search('FIND {bar}')
# Find all occurrences of 'bar'

Examples

sosl - A SOSL expression.

Public: Perform a SOSL search
def search(sosl)
  api_get('search', :q => sosl).body
end