Hi Steve

The reason this error is happening only after searches is because the indexes 
are only loaded when you search - so prior to then, nothing will happen.

You've mentioned the Sphinx instance is running on a different server, but 
you've got localhost in your sphinx.yml file, which doesn't help. Also, you may 
want to explicitly set the version to avoid the warnings:

  version: 0.9.9

As for disabling updates altogether, set ThinkingSphinx.updates_enabled - this 
needs to be done at the end of environment.rb (not in qa.rb - Thinking Sphinx 
hasn't been loaded, so this causes double-loading, and the setting is ignored).

  ThinkingSphinx.updates_enabled = false

While you're at it, it's probably worth telling Thinking Sphinx the daemon is 
remote (so it doesn't look for the pid file):

  ThinkingSphinx.remote_sphinx = true

All that said, I've no idea why this issue has cropped up now but not in other 
environments...

-- 
Pat

On 20/08/2010, at 8:55 AM, Steve H wrote:

> Hi Pat!
> 
> I'm sad to report that our problem actually continues...  earlier I
> thought we had fixed the problem, because what I was doing before to
> reproduce ("Address.first.save") no longer caused an error.
> 
> What I just discovered is that *now* this will still cause an error,
> if you've done a search first.  I'm just about at my wit's end.
> Observe my reproduction of this error:
> 
> $ script/console qa
> Loading qa environment (Rails 2.3.2)
> 
> Sphinx cannot be found on your system. You may need to configure the
> following
> settings in your config/sphinx.yml file:
>  * bin_path
>  * searchd_binary_name
>  * indexer_binary_name
> 
> For more information, read the documentation:
> http://freelancing-god.github.com/ts/en/advanced_config.html
> 
> Sphinx cannot be found on your system. You may need to configure the
> following
> settings in your config/sphinx.yml file:
>  * bin_path
>  * searchd_binary_name
>  * indexer_binary_name
> 
> For more information, read the documentation:
> http://freelancing-god.github.com/ts/en/advanced_config.html
> /ip/releases/20100818064707/config/initializers/jrails.rb:1: warning:
> already initialized constant JQUERY_VAR
> WARNING: As of 2.3, a breaking change has been in the naming of sub-
> objects. ROXML now considers the xml_name of the sub-object before
> falling back to the accessor name of the parent. Use :from on the
> parent declaration to override this behavior. Set
> ROXML::SILENCE_XML_NAME_WARNING to avoid this message.
>>> review = IpReview.find 10305283487
> => #<IpReview id: 10305283487, created_at: "2010-08-19 21:57:00",
> updated_at: "2010-08-19 21:57:00", rating: 4, title: "Best thin crust
> in the east bay", review_text: "Great New York style pizza (ie, thin
> crust), great ...", member_id: 5357794233, business_id: 10319935094,
> helpful_count: 0, not_helpful_count: 0, is_anonymous: false,
> is_first_review: false, ip_address: "10.9.0.26", type: "IpReview",
> cs_author: nil, cs_pros: nil, cs_cons: nil, cs_id: nil, external_url:
> nil>
>>> atts = {"rating"=>"4", "title"=>"Best thin crust in the east bay", 
>>> "review_text"=>"Great New York style pizza (ie, thin crust), great beers on 
>>> tap.  What more could a guy ask for?\r\n\r\nAlthough, I guess I would be 
>>> remiss not to mention that occasionally service leaves something to be 
>>> desired...\r\n\r\nBut as long as you're not in a big hurry, I would highly 
>>> recommend this place.  It's my \"go-to\" thin-crust pizza place."}
> => {"rating"=>"4", "title"=>"Best thin crust in the east bay",
> "review_text"=>"Great New York style pizza (ie, thin crust), great
> beers on tap.  What more could a guy ask for?\r\n\r\nAlthough, I guess
> I would be remiss not to mention that occasionally service leaves
> something to be desired...\r\n\r\nBut as long as you're not in a big
> hurry, I would highly recommend this place.  It's my \"go-to\" thin-
> crust pizza place."}
>>> review.update_attributes atts
> => true
>>> Address.search "pizza"
> => [#<Address id: 1499, business_id: 2514770805, phone: "4155643900",
> address_1: "1825 Irving Street", address_2: nil, city_id: 2638,
> state_code: "CA", country_code: "USA", zip_code: "94122", lat:
> 37.763429, lon: -122.477588, created_at: "2010-08-04 18:48:00",
> updated_at: "2010-08-04 18:48:00">, #<Address id: 1634, business_id:
> 2521630805, phone: "2067834061", address_1: "5327 Ballard Ave NW",
> address_2: nil, city_id: 27992, state_code: "WA", country_code: "USA",
> zip_code: "98107", lat: 47.666744, lon: -122.383787, created_at:
> "2010-08-04 18:48:00", updated_at: "2010-08-04 18:48:00">, #<Address
> id: 1809, business_id: 2529780805, phone: "6269189545", address_1:
> "16423 Maplegrove St", address_2: nil, city_id: 2234, state_code:
> "CA", country_code: "USA", zip_code: "91744", lat: 34.044139, lon:
> -117.925275, created_at: "2010-08-04 18:48:00", updated_at:
> "2010-08-04 18:48:00">, #<Address id: 2029, business_id: 2532560941,
> phone: "5628684100", address_1: "11033 Rosecrans Ave # C", address_2:
> nil, city_id: 2440, state_code: "CA", country_code: "USA", zip_code:
> "90650", lat: 33.902199, lon: -118.099126, created_at: "2010-08-04
> 18:48:00", updated_at: "2010-08-04 18:48:00">, #<Address id: 2046,
> business_id: 2532565983, phone: "5629201234", address_1: "10040
> ROSECRANS AVE", address_2: nil, city_id: 1757, state_code: "CA",
> country_code: "USA", zip_code: "90706", lat: 33.9019, lon: -118.1192,
> created_at: "2010-08-04 18:48:00", updated_at: "2010-08-10 09:51:00">,
> #<Address id: 2054, business_id: 2532569207, phone: "7145278749",
> address_1: "11122 Los Alamitos Blvd", address_2: nil, city_id: 2297,
> state_code: "CA", country_code: "USA", zip_code: "90720", lat:
> 33.801274, lon: -118.071798, created_at: "2010-08-04 18:48:00",
> updated_at: "2010-08-04 18:48:00">, #<Address id: 2372, business_id:
> 2536917340, phone: "4158213949", address_1: "3489 Mission St",
> address_2: nil, city_id: 2638, state_code: "CA", country_code: "USA",
> zip_code: "94110", lat: 37.741044, lon: -122.422445, created_at:
> "2010-08-04 18:48:00", updated_at: "2010-08-04 18:48:00">, #<Address
> id: 2486, business_id: 2540747340, phone: "6263013565", address_1:
> "1804 Buena Vista st.", address_2: nil, city_id: 1986, state_code:
> "CA", country_code: "USA", zip_code: "91010", lat: 34.132033, lon:
> -117.977333, created_at: "2010-08-04 18:48:00", updated_at:
> "2010-08-04 18:48:00">, #<Address id: 2641, business_id: 2545877340,
> phone: "2259367077", address_1: "9609 Plank Road", address_2: nil,
> city_id: 9662, state_code: "LA", country_code: "USA", zip_code:
> "70722", lat: 30.852456, lon: -91.007224, created_at: "2010-08-04
> 18:48:00", updated_at: "2010-08-04 18:48:00">, #<Address id: 2980,
> business_id: 3535277340, phone: "3018164800", address_1: "11638
> ROCKVILLE PIKE", address_2: nil, city_id: 10904, state_code: "MD",
> country_code: "USA", zip_code: "20852", lat: 39.0472, lon: -77.1132,
> created_at: "2010-08-04 18:48:00", updated_at: "2010-08-04 18:48:00">,
> #<Address id: 2997, business_id: 3535947340, phone: "3012777722",
> address_1: "4509 College Ave", address_2: nil, city_id: 10661,
> state_code: "MD", country_code: "USA", zip_code: "20740", lat:
> 38.981875, lon: -76.937176, created_at: "2010-08-04 18:48:00",
> updated_at: "2010-08-04 18:48:00">, #<Address id: 2998, business_id:
> 3535957340, phone: "3014745350", address_1: "6160 Greenbelt Rd",
> address_2: nil, city_id: 10749, state_code: "MD", country_code: "USA",
> zip_code: "20770", lat: 38.997538, lon: -76.908103, created_at:
> "2010-08-04 18:48:00", updated_at: "2010-08-04 18:48:00">, #<Address
> id: 3646, business_id: 3559597340, phone: "2537598334", address_1:
> "5114 6th Ave", address_2: nil, city_id: 28033, state_code: "WA",
> country_code: "USA", zip_code: "98406", lat: 47.255263, lon:
> -122.505979, created_at: "2010-08-04 18:48:00", updated_at:
> "2010-08-04 18:48:00">, #<Address id: 3997, business_id: 3572697340,
> phone: "2545626999", address_1: "1322 E. Mialm", address_2: nil,
> city_id: 25611, state_code: "TX", country_code: "USA", zip_code:
> "76667", lat: 31.685486, lon: -96.462385, created_at: "2010-08-04
> 18:48:00", updated_at: "2010-08-04 18:48:00">, #<Address id: 4158,
> business_id: 3579227340, phone: "9108643587", address_1: "113 E.
> Blackstock Road", address_2: nil, city_id: 23783, state_code: "SC",
> country_code: "USA", zip_code: "29301", lat: 34.935373, lon:
> -81.99012, created_at: "2010-08-04 18:48:00", updated_at: "2010-08-04
> 18:48:00">, #<Address id: 4339, business_id: 3586317340, phone:
> "6613755000", address_1: "4200 Stine Rd Ste A", address_2: nil,
> city_id: 1741, state_code: "CA", country_code: "USA", zip_code:
> "93313", lat: 35.317046, lon: -119.056531, created_at: "2010-08-04
> 18:48:00", updated_at: "2010-08-04 18:48:00">, #<Address id: 4419,
> business_id: 3589037340, phone: "7066290295", address_1: "613 West
> Belmont Drive", address_2: nil, city_id: 4253, state_code: "GA",
> country_code: "USA", zip_code: "30701", lat: 34.481293, lon:
> -84.949321, created_at: "2010-08-04 18:48:00", updated_at: "2010-08-04
> 18:48:00">, #<Address id: 4494, business_id: 3591707340, phone:
> "2036391000", address_1: "43 Colony St.", address_2: nil, city_id:
> 3433, state_code: "CT", country_code: "USA", zip_code: "06450", lat:
> 41.536636, lon: -72.802648, created_at: "2010-08-04 18:48:00",
> updated_at: "2010-08-04 18:48:00">, #<Address id: 4552, business_id:
> 3593617340, phone: "7708528282", address_1: "5550 Peachtree INdustrial
> Blvd.", address_2: nil, city_id: 4195, state_code: "GA", country_code:
> "USA", zip_code: "30341", lat: 33.899774, lon: -84.300639, created_at:
> "2010-08-04 18:48:00", updated_at: "2010-08-04 18:48:00">, #<Address
> id: 4567, business_id: 3594037340, phone: "7062089552", address_1:
> "122 Alps Road", address_2: nil, city_id: 4194, state_code: "GA",
> country_code: "USA", zip_code: "30606", lat: 33.94857, lon:
> -83.409668, created_at: "2010-08-04 18:48:00", updated_at: "2010-08-04
> 18:48:00">]
>>> review.update_attributes atts
> Riddle::ResponseError: searchd error (status: 1): index address_core:
> attribute 'sphinx_internal_id' can not be updated (must be boolean,
> integer, timestamp, or MVA)
>       from /home/ip/.bundle/ruby/1.8/gems/riddle-1.0.12/lib/riddle/
> client.rb:601:in `request'
>       from /home/ip/.bundle/ruby/1.8/gems/riddle-1.0.12/lib/riddle/
> client.rb:397:in `update'
>       from /opt/local/ruby-enterprise-1.8.6-20090610/lib/ruby/gems/1.8/gems/
> thinking-sphinx-1.3.14/lib/thinking_sphinx/active_record/
> attribute_updates.rb:26:in `update_attribute_values'
>       from /opt/local/ruby-enterprise-1.8.6-20090610/lib/ruby/gems/1.8/gems/
> thinking-sphinx-1.3.14/lib/thinking_sphinx/active_record/
> attribute_updates.rb:19:in `each'
>       from /opt/local/ruby-enterprise-1.8.6-20090610/lib/ruby/gems/1.8/gems/
> thinking-sphinx-1.3.14/lib/thinking_sphinx/active_record/
> attribute_updates.rb:19:in `update_attribute_values'
>       from /opt/local/ruby-enterprise-1.8.6-20090610/lib/ruby/gems/1.8/gems/
> activesupport-2.3.2/lib/active_support/callbacks.rb:178:in `send'
>       from /opt/local/ruby-enterprise-1.8.6-20090610/lib/ruby/gems/1.8/gems/
> activesupport-2.3.2/lib/active_support/callbacks.rb:178:in
> `evaluate_method'
>       from /opt/local/ruby-enterprise-1.8.6-20090610/lib/ruby/gems/1.8/gems/
> activesupport-2.3.2/lib/active_support/callbacks.rb:166:in `call'
>       from /opt/local/ruby-enterprise-1.8.6-20090610/lib/ruby/gems/1.8/gems/
> activesupport-2.3.2/lib/active_support/callbacks.rb:93:in `run'
>       from /opt/local/ruby-enterprise-1.8.6-20090610/lib/ruby/gems/1.8/gems/
> activesupport-2.3.2/lib/active_support/callbacks.rb:92:in `each'
>       from /opt/local/ruby-enterprise-1.8.6-20090610/lib/ruby/gems/1.8/gems/
> activesupport-2.3.2/lib/active_support/callbacks.rb:92:in `send'
>       from /opt/local/ruby-enterprise-1.8.6-20090610/lib/ruby/gems/1.8/gems/
> activesupport-2.3.2/lib/active_support/callbacks.rb:92:in `run'
>       from /opt/local/ruby-enterprise-1.8.6-20090610/lib/ruby/gems/1.8/gems/
> activesupport-2.3.2/lib/active_support/callbacks.rb:276:in
> `run_callbacks'
>       from /opt/local/ruby-enterprise-1.8.6-20090610/lib/ruby/gems/1.8/gems/
> activerecord-2.3.2/lib/active_record/callbacks.rb:344:in `callback'
>       from /home/ip/.bundle/ruby/1.8/gems/after_commit-1.0.7/lib/
> after_commit/connection_adapters.rb:129:in `send'
>       from /home/ip/.bundle/ruby/1.8/gems/after_commit-1.0.7/lib/
> after_commit/connection_adapters.rb:129:in
> `trigger_after_commit_callbacks'
>       from /home/ip/.bundle/ruby/1.8/gems/after_commit-1.0.7/lib/
> after_commit/connection_adapters.rb:128:in `each'
>       from /home/ip/.bundle/ruby/1.8/gems/after_commit-1.0.7/lib/
> after_commit/connection_adapters.rb:128:in
> `trigger_after_commit_callbacks'
>       from /home/ip/.bundle/ruby/1.8/gems/after_commit-1.0.7/lib/
> after_commit/connection_adapters.rb:36:in `commit_db_transaction'
>       from /opt/local/ruby-enterprise-1.8.6-20090610/lib/ruby/gems/1.8/gems/
> activerecord-2.3.2/lib/active_record/connection_adapters/abstract/
> database_statements.rb:159:in `transaction_without_callback'
>       from /home/ip/.bundle/ruby/1.8/gems/after_commit-1.0.7/lib/
> after_commit/connection_adapters.rb:12:in `transaction'
>       from /opt/local/ruby-enterprise-1.8.6-20090610/lib/ruby/gems/1.8/gems/
> activerecord-2.3.2/lib/active_record/transactions.rb:182:in
> `transaction'
>       from /opt/local/ruby-enterprise-1.8.6-20090610/lib/ruby/gems/1.8/gems/
> activerecord-2.3.2/lib/active_record/transactions.rb:228:in
> `with_transaction_returning_status'
>       from /opt/local/ruby-enterprise-1.8.6-20090610/lib/ruby/gems/1.8/gems/
> activerecord-2.3.2/lib/active_record/transactions.rb:196:in `save'
>       from /opt/local/ruby-enterprise-1.8.6-20090610/lib/ruby/gems/1.8/gems/
> activerecord-2.3.2/lib/active_record/transactions.rb:208:in
> `rollback_active_record_state!'
>       from /opt/local/ruby-enterprise-1.8.6-20090610/lib/ruby/gems/1.8/gems/
> activerecord-2.3.2/lib/active_record/transactions.rb:196:in `save'
>       from /opt/local/ruby-enterprise-1.8.6-20090610/lib/ruby/gems/1.8/gems/
> activerecord-2.3.2/lib/active_record/base.rb:2628:in
> `update_attributes'
>       from (irb):5>>
> 
> On Aug 19, 10:23 am, Steve H <[email protected]> wrote:
>> Hi Pat!
>> 
>> Is it possible to turn off these automatic updates that ts tries to
>> do?  That seems like the first and easiest way we could mitigate this
>> issue...
>> 
>> Nothing odd happening, just basically did `Address.first.save` to
>> bring out the issue.
>> 
>> We have extensively modified our *.sphinx.conf files, so our
>> sphinx.yml file doesn't really reflect those sphinx configuration
>> files very well.  The relevant portion of the sphinx.yml file is:
>> 
>> qa:
>>   address: localhost
>>   port: 9312
>>   mem_limit: 512M
>>   sql_range_step: 100000000
>> 
>> I notice immediately that sphinx_internal_id isn't listed here...
>> while it is in the "development" section.  So I tried putting it in
>> there and it seems to have solved the issue.
>> 
>> I'm still kinda uneasy, as there were no code changes; just adding
>> Bundler.  sphinx.yml hasn't changed, so why wasn't this failing
>> before?  Is it possible that it was silently failing?  Or somehow
>> skipping this?
>> 
>> Sphinx is running on a different machine altogether from passenger.
>> Could this be a problem somehow?  In production we have like 5 sphinx
>> servers, each on their own vm, with searches loadbalanced between
>> them.  Seems to be working great...
>> 
>> Thanks for your quick reply and pointing me in the right
>> direction!  :)
>> 
>> -Steve
>> 
>> On Aug 19, 7:29 am, Pat Allan <[email protected]> wrote:
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>>> Hi Steve
>> 
>>> Even without deltas, Thinking Sphinx will try to update any 
>>> integer/boolean/timestamp attributes (generally running with the 
>>> some-updates are better than no-updates), as Sphinx allows for this. So 
>>> this is why the calls are being made...
>> 
>>> However, I'm a little confused as why it's trying to update 
>>> sphinx_internal_id - that's just an attribute of the primary key of the 
>>> model, which obviously does not change, unless you're doing something 
>>> really odd?
>> 
>>> That said, it's an integer attribute, and so should be fine to update... do 
>>> you have a config/sphinx.yml file, and if so, what's in it? Also, are you 
>>> running Sphinx with the same user that the Rails app is running with? (that 
>>> is, the owner of the app files if you're using Passenger).
>> 
>>> --
>>> Pat
>> 
>>> On 19/08/2010, at 2:27 PM, Steve H wrote:
>> 
>>>> We recently have been making an effort to managing our dependencies
>>>> with Bundler in our Rails 2.3.2 app.
>> 
>>>> About 6 months ago we implemented ThinkingSphinx, and have been very
>>>> happy with it thus far.
>> 
>>>> Strangely, after we deployed our Bundler release to our QA
>>>> environment, we started seeing errors like the one below whenever we
>>>> try to save or update a record of indexed model.
>>>> This is strange because we never setup delta indexing, so I would not
>>>> expect any sphinx-related callbacks to be executed on saves/updates/
>>>> destroys/creates.
>> 
>>>>>> a.save
>>>> Riddle::ResponseError: searchd error (status: 1): index address_core:
>>>> attribute 'sphinx_internal_id' can not be updated (must be boolean,
>>>> integer, timestamp, or MVA)
>>>>    from /opt/local/ruby-enterprise-1.8.6-20090610/lib/ruby/gems/1.8/gems/
>>>> riddle-1.0.8/lib/riddle/client.rb:582:in `request'
>>>>    from /opt/local/ruby-enterprise-1.8.6-20090610/lib/ruby/gems/1.8/gems/
>>>> riddle-1.0.8/lib/riddle/client.rb:384:in `update'
>>>>    from /opt/local/ruby-enterprise-1.8.6-20090610/lib/ruby/gems/1.8/gems/
>>>> thinking-sphinx-1.3.14/lib/thinking_sphinx/active_record/
>>>> attribute_updates.rb:26:in `update_attribute_values'
>>>>    from /opt/local/ruby-enterprise-1.8.6-20090610/lib/ruby/gems/1.8/gems/
>>>> thinking-sphinx-1.3.14/lib/thinking_sphinx/active_record/
>>>> attribute_updates.rb:19:in `each'
>>>>    from /opt/local/ruby-enterprise-1.8.6-20090610/lib/ruby/gems/1.8/gems/
>>>> thinking-sphinx-1.3.14/lib/thinking_sphinx/active_record/
>>>> attribute_updates.rb:19:in `update_attribute_values'
>>>>    from /opt/local/ruby-enterprise-1.8.6-20090610/lib/ruby/gems/1.8/gems/
>>>> activesupport-2.3.2/lib/active_support/callbacks.rb:178:in `send'
>>>>    from /opt/local/ruby-enterprise-1.8.6-20090610/lib/ruby/gems/1.8/gems/
>>>> activesupport-2.3.2/lib/active_support/callbacks.rb:178:in
>>>> `evaluate_method'
>>>>    from /opt/local/ruby-enterprise-1.8.6-20090610/lib/ruby/gems/1.8/gems/
>>>> activesupport-2.3.2/lib/active_support/callbacks.rb:166:in `call'
>>>>    from /opt/local/ruby-enterprise-1.8.6-20090610/lib/ruby/gems/1.8/gems/
>>>> activesupport-2.3.2/lib/active_support/callbacks.rb:93:in `run'
>>>>    from /opt/local/ruby-enterprise-1.8.6-20090610/lib/ruby/gems/1.8/gems/
>>>> activesupport-2.3.2/lib/active_support/callbacks.rb:92:in `each'
>>>>    from /opt/local/ruby-enterprise-1.8.6-20090610/lib/ruby/gems/1.8/gems/
>>>> activesupport-2.3.2/lib/active_support/callbacks.rb:92:in `send'
>>>>    from /opt/local/ruby-enterprise-1.8.6-20090610/lib/ruby/gems/1.8/gems/
>>>> activesupport-2.3.2/lib/active_support/callbacks.rb:92:in `run'
>>>>    from /opt/local/ruby-enterprise-1.8.6-20090610/lib/ruby/gems/1.8/gems/
>>>> activesupport-2.3.2/lib/active_support/callbacks.rb:276:in
>>>> `run_callbacks'
>>>>    from /opt/local/ruby-enterprise-1.8.6-20090610/lib/ruby/gems/1.8/gems/
>>>> activerecord-2.3.2/lib/active_record/callbacks.rb:344:in `callback'
>>>>    from /home/ip/.bundle/ruby/1.8/gems/after_commit-1.0.7/lib/
>>>> after_commit/connection_adapters.rb:129:in `send'
>>>>    from /home/ip/.bundle/ruby/1.8/gems/after_commit-1.0.7/lib/
>>>> after_commit/connection_adapters.rb:129:in
>>>> `trigger_after_commit_callbacks'
>>>>    from /home/ip/.bundle/ruby/1.8/gems/after_commit-1.0.7/lib/
>>>> after_commit/connection_adapters.rb:128:in `each'
>>>>    from /home/ip/.bundle/ruby/1.8/gems/after_commit-1.0.7/lib/
>>>> after_commit/connection_adapters.rb:128:in
>>>> `trigger_after_commit_callbacks'
>>>>    from /home/ip/.bundle/ruby/1.8/gems/after_commit-1.0.7/lib/
>>>> after_commit/connection_adapters.rb:36:in `commit_db_transaction'
>>>>    from /opt/local/ruby-enterprise-1.8.6-20090610/lib/ruby/gems/1.8/gems/
>>>> activerecord-2.3.2/lib/active_record/connection_adapters/abstract/
>>>> database_statements.rb:159:in `transaction_without_callback'
>>>>    from /home/ip/.bundle/ruby/1.8/gems/after_commit-1.0.7/lib/
>>>> after_commit/connection_adapters.rb:12:in `transaction'
>>>>    from /opt/local/ruby-enterprise-1.8.6-20090610/lib/ruby/gems/1.8/gems/
>>>> activerecord-2.3.2/lib/active_record/transactions.rb:182:in
>>>> `transaction'
>>>>    from /opt/local/ruby-enterprise-1.8.6-20090610/lib/ruby/gems/1.8/gems/
>>>> activerecord-2.3.2/lib/active_record/transactions.rb:228:in
>>>> `with_transaction_returning_status'
>>>>    from /opt/local/ruby-enterprise-1.8.6-20090610/lib/ruby/gems/1.8/gems/
>>>> activerecord-2.3.2/lib/active_record/transactions.rb:196:in `save'
>>>>    from /opt/local/ruby-enterprise-1.8.6-20090610/lib/ruby/gems/1.8/gems/
>>>> activerecord-2.3.2/lib/active_record/transactions.rb:208:in
>>>> `rollback_active_record_state!'
>>>>    from /opt/local/ruby-enterprise-1.8.6-20090610/lib/ruby/gems/1.8/gems/
>>>> activerecord-2.3.2/lib/active_record/transactions.rb:196:in `save'
>> 
>>>> class Address < ActiveRecord::Base
>>>>  define_index do
>>>>    indexes business(:name), :as => :name, :sortable => true
>>>>    indexes business.categories_and_tags(:name), :as => :category
>>>>    indexes :city_id, :type => :integer
>>>>    indexes zip_code
>> 
>>>>    has business.categories_and_tags(:id), :as => :category_id
>>>>    has "RADIANS(lat)",  :as => :latitude,  :type => :float
>>>>    has "RADIANS(lon)", :as => :longitude, :type => :float
>>>>    has 'city_id', :as => 'city', :type => :integer
>>>>    has "COUNT(business.reviews.id)", :as => :review_count, :type
>>>> => :integer
>>>>    has "CEIL(1/business.merchant.merchant_id)", :as
>>>> => :claimed, :type => :integer
>>>>    has "CEIL(1/business.cs_customer.available_cap)", :as
>>>> => :available_cap, :type => :integer
>>>>  end
>>>>  # etc ...
>>>> end
>> 
>>>> -Steve
>> 
>>>> --
>>>> You received this message because you are subscribed to the Google Groups 
>>>> "Thinking Sphinx" group.
>>>> To post to this group, send email to [email protected].
>>>> To unsubscribe from this group, send email to 
>>>> [email protected].
>>>> For more options, visit this group 
>>>> athttp://groups.google.com/group/thinking-sphinx?hl=en.
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "Thinking Sphinx" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to 
> [email protected].
> For more options, visit this group at 
> http://groups.google.com/group/thinking-sphinx?hl=en.
> 

-- 
You received this message because you are subscribed to the Google Groups 
"Thinking Sphinx" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/thinking-sphinx?hl=en.

Reply via email to