Skip to content

Instantly share code, notes, and snippets.

@yob
Created April 11, 2009 12:46
Show Gist options
  • Save yob/93555 to your computer and use it in GitHub Desktop.
Save yob/93555 to your computer and use it in GitHub Desktop.
>> ed = Edition.find(1)
=> #<Edition id: 1, work_id: 469942, ean: "9781857230765", name: "Eye of the World(1) :Wheel Of Time Series">
>> Edition.search("9781857230765")
=> [#<Edition id: 1, work_id: 469942, ean: "9781857230765", name: "Eye of the World(1) :Wheel Of Time Series">]
>> Edition.search("9781857230764")
=> []
>> ed.update_attributes(:ean => "9781857230764")
Sphinx 0.9.8-release (r1371)
Copyright (c) 2001-2008, Andrew Aksyonoff
using config file '/home/jh/git/rba_staff_site/config/production.sphinx.conf'...
indexing index 'edition_delta'...
collected 7 docs, 0.0 MB
collected 0 attr values
sorted 0.0 Mvalues, 100.0% done
sorted 0.0 Mhits, 97.5% done
total 7 docs, 1257 bytes
total 0.983 sec, 1278.95 bytes/sec, 7.12 docs/sec
rotating indices: succesfully sent SIGHUP to searchd (pid=3329).
=> true
>> Edition.search("9781857230764")
=> [#<Edition id: 1, work_id: 469942, ean: "9781857230764", name: "Eye of the World(1) :Wheel Of Time Series">]
>> Edition.search("9781857230765")
=> [#<Edition id: 1, work_id: 469942, ean: "9781857230764", name: "Eye of the World(1) :Wheel Of Time Series">]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment