Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change DB schema from using parsed to native column #980

Closed
icarito opened this issue Nov 10, 2016 · 3 comments
Closed

Change DB schema from using parsed to native column #980

icarito opened this issue Nov 10, 2016 · 3 comments
Labels
help wanted requires help by anyone willing to contribute Ruby systems

Comments

@icarito
Copy link
Member

icarito commented Nov 10, 2016

Changed the DB schema in Node to point at the native column name instead of alias.

Solr is having issues with the (huge) users database in production and this has been identified as related.

Part of the problem may be that it's not really an alias - it does some extra timestamp parsing:

plots2/app/models/node.rb

Lines 270 to 272 in ceb7d05

DrupalContentFieldImageGallery.where(nid: nid)
.order('field_image_gallery_fid')
end

I.e. this line would become "changed" --

updated_at.strftime('%B %Y')

@jywarren suggested this might be a good first-timers-only task. It's related to general issue of

#956

@icarito icarito added the first-timers-only They need to be well-formatted using the First-timers_Issue_Template. label Nov 10, 2016
@icarito
Copy link
Member Author

icarito commented Nov 10, 2016

When trying the naive approach of replacing updated_at for changed in drupal_node.rb like this:

+++ b/app/models/drupal_node.rb
@@ -25,7 +25,7 @@ class DrupalNode < ActiveRecord::Base                                                                                            text :body do
       body.to_s.gsub!(/[[:cntrl:]]/,'')
     end
-    time :updated_at
+    time :changed

I get the following error when reindexing:

[################################                                                    ] [322850/845573] [ 38.18%] [02:34] [04:10] [  2085.76/s]rake aborted!
ArgumentError: changed is not a multiple-value field, so it cannot index values []

@jywarren jywarren added fto-candidate issues which are meant to be solved by first timers but aren't well-formatted yet help wanted requires help by anyone willing to contribute Ruby and removed first-timers-only They need to be well-formatted using the First-timers_Issue_Template. fto-candidate issues which are meant to be solved by first timers but aren't well-formatted yet labels Nov 10, 2016
@morrme
Copy link
Contributor

morrme commented Apr 23, 2017

The files seem to have been changed since this issue was created.

@jywarren
Copy link
Member

Closing this -- we no longer use Solr! Thanks!

@jywarren jywarren added this to the Deprecating Old Features milestone Feb 17, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted requires help by anyone willing to contribute Ruby systems
Projects
None yet
Development

No branches or pull requests

3 participants