Ok, I changed the '2' to a 2 and restarted my computer (when all else
fails, restart your computer!) and all is well now :)
On May 1, 10:08 am, liquid_rails <[EMAIL PROTECTED]> wrote:
> I'm having problems with the is_indexed fields in ultrasphinx and was
> wondering if anybody has seen this error before...
>
> When I do this in my location model
>
> is_indexed :fields => [{:field => 'id', :as =>
> 'activerecord_id'},'name','state'], :eagerly_load
> =>[:categories, :subcategories]
>
> and this in my controller:
>
> @locations = Ultrasphinx::Search.new(:query => @query, :class_names =>
> 'Location', :filters => {'activerecord_id' => '2'})
>
> I get this error in my browser
>
> index main: query error: no field 'activerecord_id' found in schema
>
> vendor/plugins/ultrasphinx/lib/ultrasphinx/search.rb:360:in `run'
> vendor/plugins/ultrasphinx/lib/ultrasphinx/search/internals.rb:351:in
> `perform_action_with_retries'
> vendor/plugins/ultrasphinx/lib/ultrasphinx/search.rb:337:in `run'
> app/controllers/categories_controller.rb:12:in `index'
> ----------
> My development.conf looks like this
>
> sql_query = SELECT (locations.id * 3 + 1) AS id, locations.id AS
> activerecord_id, 0 AS category_id, 'Location' AS class, 1 AS class_id,
> 0 AS location_id, locations.name AS name, locations.state AS state
> FROM locations WHERE locations.id >= $start AND locations.id <= $end
> GROUP BY locations.id
>
> ----
> Any idea what might be wrong?
>
> Thanks!
--~--~---------~--~----~------------~-------~--~----~
SD Ruby mailing list
[email protected]
http://groups.google.com/group/sdruby
-~----------~----~----~----~------~----~------~--~---