Skip to content
This repository has been archived by the owner on Jan 8, 2024. It is now read-only.

Commit

Permalink
RSolr.escape has been replaced with RSolr.solr_escape
Browse files Browse the repository at this point in the history
  • Loading branch information
sweetleon committed Dec 19, 2017
1 parent 26a7be4 commit 74b0bac
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion sunspot/lib/sunspot/indexer.rb
Expand Up @@ -55,7 +55,7 @@ def remove_by_id(class_name, *ids)
#
def remove_all(clazz = nil)
if clazz
@connection.delete_by_query("type:#{escape(clazz.name)}")
@connection.delete_by_query("type:#{solr_escape(clazz.name)}")
else
@connection.delete_by_query("*:*")
end
Expand Down
2 changes: 1 addition & 1 deletion sunspot/lib/sunspot/query/function_query.rb
Expand Up @@ -34,7 +34,7 @@ def initialize(field)
end

def to_s
"#{escape(@field.indexed_name)}" << (@boost_amount ? "^#{@boost_amount}" : "")
"#{sunspot_solr(@field.indexed_name)}" << (@boost_amount ? "^#{@boost_amount}" : "")
end
end

Expand Down
6 changes: 3 additions & 3 deletions sunspot/lib/sunspot/query/restriction.rb
Expand Up @@ -92,7 +92,7 @@ def to_boolean_phrase
# String:: Boolean phrase for restriction in the positive
#
def to_positive_boolean_phrase
"#{escape(@field.indexed_name)}:#{to_solr_conditional}"
"#{solr_escape(@field.indexed_name)}:#{to_solr_conditional}"
end

#
Expand Down Expand Up @@ -138,7 +138,7 @@ def negate
# String:: Solr API representation of given value
#
def solr_value(value = @value)
solr_value = escape(@field.to_indexed(value))
solr_value = solr_escape(@field.to_indexed(value))
if RESERVED_WORDS.include?(solr_value)
%Q("#{solr_value}")
else
Expand Down Expand Up @@ -168,7 +168,7 @@ def to_positive_boolean_phrase
unless @value.nil?
super
else
"#{escape(@field.indexed_name)}:[* TO *]"
"#{solr_escape(@field.indexed_name)}:[* TO *]"
end
end

Expand Down

0 comments on commit 74b0bac

Please sign in to comment.