deprecration warnings in sunspot 2.1.1 when using rsolr 1.0.11 #661

Closed
codeforkjeff opened this Issue Feb 27, 2015 · 16 comments

Comments

Projects
None yet
@codeforkjeff
Contributor

codeforkjeff commented Feb 27, 2015

FYI, after upgrading to rsolr 1.0.11 (released just today), I get this deprecation warning when running bundle exec rake sunspot:solr:reindex

[DEPRECATION] `RSolr.escape` is deprecated (and incorrect).  Use `Rsolr.solr_escape` instead.

The following files call #escape which is made available through include RSolr::Char (which is deprecated as a whole; there's nothing else in that module):

sunspot/lib/sunspot/query/restriction.rb
sunspot/lib/sunspot/query/function_query.rb
sunspot/lib/sunspot/indexer.rb

I think the call can simply be replaced with Rsolr#solr_escape although these are 2 potential issues:

  1. they don't do the exact same escaping
  2. it seems there is other/additional escaping going on in things like Sunspot::Query::Restriction::Base#solr_value, which should be checked against the Rsolr#solr_escape to avoid double escaping.
@sevenseacat

This comment has been minimized.

Show comment
Hide comment
@sevenseacat

sevenseacat Feb 27, 2015

just came to post this exact thing!

just came to post this exact thing!

@DaniG2k

This comment has been minimized.

Show comment
Hide comment

DaniG2k commented Mar 1, 2015

+1

@reconstructions

This comment has been minimized.

Show comment
Hide comment
@davidimoore

This comment has been minimized.

Show comment
Hide comment
@davidimoore

davidimoore Mar 2, 2015

Is it safe to say this repo is no longer maintained? I was going to post the same deprecation warning.

Is it safe to say this repo is no longer maintained? I was going to post the same deprecation warning.

@codeforkjeff

This comment has been minimized.

Show comment
Hide comment
@codeforkjeff

codeforkjeff Mar 3, 2015

Contributor

I've submitted a pull request. Note that I'm not at all an expert on Solr, so if you merge this before the Sunspot folks get a chance to review it, it's very much at your own risk!

Contributor

codeforkjeff commented Mar 3, 2015

I've submitted a pull request. Note that I'm not at all an expert on Solr, so if you merge this before the Sunspot folks get a chance to review it, it's very much at your own risk!

@ehsanyou

This comment has been minimized.

Show comment
Hide comment
@ehsanyou

ehsanyou Mar 3, 2015

For now, just change rsolr version to 1.0.7 in Gemfile.lock and then run bundle!

ehsanyou commented Mar 3, 2015

For now, just change rsolr version to 1.0.7 in Gemfile.lock and then run bundle!

@alecslupu

This comment has been minimized.

Show comment
Hide comment
@alecslupu

alecslupu Mar 11, 2015

I get the same Deprecation warning.

I get the same Deprecation warning.

@nimzco

This comment has been minimized.

Show comment
Hide comment
@nimzco

nimzco Mar 14, 2015

Same here.

nimzco commented Mar 14, 2015

Same here.

@hapiben

This comment has been minimized.

Show comment
Hide comment
@hapiben

hapiben Mar 16, 2015

Same here. +1

hapiben commented Mar 16, 2015

Same here. +1

@IslamAzab

This comment has been minimized.

Show comment
Hide comment
@IslamAzab

IslamAzab Mar 21, 2015

+1

@EhsanYousefi Why would one revert to version 1.0.7 instead of 1.0.10 for example? The deprecation and change was not added till version 1.0.11 https://github.com/rsolr/rsolr/blob/master/CHANGES.txt

+1

@EhsanYousefi Why would one revert to version 1.0.7 instead of 1.0.10 for example? The deprecation and change was not added till version 1.0.11 https://github.com/rsolr/rsolr/blob/master/CHANGES.txt

@EdwinRozario

This comment has been minimized.

Show comment
Hide comment

+1

@Valve

This comment has been minimized.

Show comment
Hide comment
@Valve

Valve Mar 25, 2015

Contributor

We're halfway done removing sunspot from our project, partially because it seems like it's abandoned. I wonder how many +1s are needed for a maintainer to actually get up and do a grep rename escape to solr_escape.

Contributor

Valve commented Mar 25, 2015

We're halfway done removing sunspot from our project, partially because it seems like it's abandoned. I wonder how many +1s are needed for a maintainer to actually get up and do a grep rename escape to solr_escape.

@libitte

This comment has been minimized.

Show comment
Hide comment

libitte commented Mar 29, 2015

+1

@mlettica

This comment has been minimized.

Show comment
Hide comment

+1

@codeforkjeff

This comment has been minimized.

Show comment
Hide comment
@codeforkjeff

codeforkjeff Mar 31, 2015

Contributor

My PR has been merged into master (thank you @njakobsen), so closing out this issue.

Contributor

codeforkjeff commented Mar 31, 2015

My PR has been merged into master (thank you @njakobsen), so closing out this issue.

@san983

This comment has been minimized.

Show comment
Hide comment

san983 commented Apr 7, 2015

👍

@niltonvasques niltonvasques referenced this issue in ViniciusLins/atlantico-portugues Apr 26, 2015

Closed

Fix solr deprecation warning messages #67

@eshadatta eshadatta referenced this issue in NYULibraries/ichabod Nov 25, 2015

Closed

Removed duplicated collection name for The Masses #193

sweetleon added a commit to Couchsurfing/sunspot that referenced this issue Dec 15, 2017

sweetleon added a commit to Couchsurfing/sunspot that referenced this issue Dec 19, 2017

sweetleon added a commit to Couchsurfing/sunspot that referenced this issue Dec 20, 2017

sweetleon added a commit to Couchsurfing/sunspot that referenced this issue Dec 20, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment