module RSolr
def self.connect *args
def self.connect *args opts = args.pop if args.last.is_a?(::Hash) opts ||= {} connection = args.first Client.new connection, opts end
def self.solr_escape(str)
-
(String)
- str with special chars preceded by a backslash
def self.solr_escape(str) # note that the gsub will parse the escaped backslashes, as will the ruby code sending the query to Solr # so the result sent to Solr is ultimately a single backslash in front of the particular character str.gsub(/([+\-&|!\(\)\{\}\[\]\^"~\*\?:\\\/])/, '\\\\\1') end
def self.version
def self.version VERSION end