Hi Raghu

Sphinx is probably getting confused because you have both a field and an 
attribute with the same name. I'd try renaming one of them, running 'rake 
ts:rebuild' and trying the search again.

Also: why are you using field searching instead of attributes and filters? I 
would think the latter would be much faster and more reliable...

Cheers

-- 
Pat

On 15/02/2011, at 10:57 PM, Raghu wrote:

> 
> 
> Controller :
> @query_string = '(@hot_request 1)(@current_status_id 1 | 2 | 3)'
> @tech_requests = TechRequest.search @query_string,:match_mode
> => :extended
> 
> 
> Model:
> class TechRequest < ActiveRecord::Base
> ...
> define_index do
> ...
> indexes  :hot_request
> indexes :status_id, :as => :current_status_id
> ...
> 
> has :hot_request , :as => :hot_request
> 
> set_property :delta => true
> end
> 
> DB:
> hot_request - tinyint(1)
> 
> When I execute the controller code-
> @query_string = '(@hot_request 1)(@current_status_id 1 | 2 | 3)'
> @tech_requests = TechRequest.search @query_string,:match_mode
> => :extended
> 
> the following error is thrown up:
> ThinkingSphinx::SphinxError: index
> tech_request_core,tech_request_delta: query error: no field
> 'tech_hot_request' found in schema
>        from D:/Current/TechAssistTest/vendor/plugins/thinking-sphinx/
> lib/thinking_sphinx/search.rb:392:in `populate'
>        from D:/Current/TechAssistTest/vendor/plugins/thinking-sphinx/
> lib/thinking_sphinx/search.rb:508:in `call'
>        from D:/Current/TechAssistTest/vendor/plugins/thinking-sphinx/
> lib/thinking_sphinx/search.rb:508:in `retry_on_stale_index'
>        from D:/Current/TechAssistTest/vendor/plugins/thinking-sphinx/
> lib/thinking_sphinx/search.rb:379:in `populate'
>        from D:/Current/TechAssistTest/vendor/plugins/thinking-sphinx/
> lib/thinking_sphinx/search.rb:167:in `method_missing'
>        from D:/ruby/lib/ruby/1.8/irb.rb:302:in `output_value'
>        from D:/ruby/lib/ruby/1.8/irb.rb:151:in `eval_input'
>        from D:/ruby/lib/ruby/1.8/irb.rb:263:in `signal_status'
>        from D:/ruby/lib/ruby/1.8/irb.rb:147:in `eval_input'
>        from D:/ruby/lib/ruby/1.8/irb.rb:146:in `eval_input'
>        from D:/ruby/lib/ruby/1.8/irb.rb:70:in `start'
>        from D:/ruby/lib/ruby/1.8/irb.rb:69:in `catch'
>        from D:/ruby/lib/ruby/1.8/irb.rb:69:in `start'
>        from D:/ruby/bin/irb:13
> The search works fine when i use hot_request as an attribute.The
> search also works fine when I user @query_string =
> '(@current_status_id 1 | 2 | 3)''
> 
> -- 
> 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