SOLR commands from the console

15 views
Skip to first unread message

fur...@gmail.com

unread,
Aug 29, 2013, 7:56:00 AM8/29/13
to bib...@googlegroups.com
Is there a way to add a given work, based on an ID for example, to the SOLR index from the console?

Jason Stirnaman

unread,
Aug 29, 2013, 10:05:56 AM8/29/13
to bib...@googlegroups.com
Sure. Start rails console and call #set_for_index_and_save on the work.
e.g.
  1.9.3-p448 :006 > works = Work.where('title_primary like ?', 'Health%')
  1.9.3-p448 :006 > works.each { |w| w.set_for_index_and_save }

Jason

On Thu, Aug 29, 2013 at 6:56 AM, fur...@gmail.com <fur...@gmail.com> wrote:
Is there a way to add a given work, based on an ID for example, to the SOLR index from the console?

--
You received this message because you are subscribed to the Google Groups "bibapp" group.
To unsubscribe from this group and stop receiving emails from it, send an email to bibapp+un...@googlegroups.com.
To post to this group, send email to bib...@googlegroups.com.
Visit this group at http://groups.google.com/group/bibapp.
For more options, visit https://groups.google.com/groups/opt_out.

fur...@gmail.com

unread,
Aug 29, 2013, 11:14:30 AM8/29/13
to bib...@googlegroups.com
Sweet.  Thanks Jason
Reply all
Reply to author
Forward
0 new messages