mysql - sql_range_query error with Sphinx -
while setting sphinx on production server, strange error came when trying index
error: index 'benefit_core': sql_range_query: have error in sql syntax; check manual corresponds mysql server version right syntax use near '' @ line 1
this doesn't happen on local machine. , yes, empty string.
does seen type of issue before?
benefit.rb
define_index # fields indexes category indexes title indexes tags indexes description indexes brief_description indexes brand indexes short_description indexes long_description indexes benefit_description indexes address.city indexes address.state indexes address.street_1 sanitize_sql(["active = true , expiration > ?", time.now]) set_property :field_weights => { :title => 15, :tags => 10, :brand => 10, :description => 3 } end
thinking-sphinx - 1.4.4
sphinx - 0.9.9
thank you!
be sure running recent version of thinking sphinx, 3.0.4 or so. looks there has been issues sanitize_sql
https://github.com/freelancing-god/thinking-sphinx/issues/213
also try re-writing line
where sanitize_sql(["active = ? , expiration > ?", true, time.now])
also try commenting out lines , gradually add them determine error occurring.
Comments
Post a Comment