Hi Jak Firstly: your first email came through - the first two posts on the mailing list are flagged (forced to the top), because they contain common questions. That seems to confuse people.
Anyway, on to your questions: * You're searching on 'j', with :star set to true - but are you enabling either prefix or infix indexing. You need to do one or the other: http://freelancing-god.github.com/ts/en/common_issues.html#wildcards What's the contents of your sphinx.yml file? * As for updating, if you're using delta indexing, then just follow the instructions in the documentation: http://freelancing-god.github.com/ts/en/deltas.html If you get stuck, let us know... you'll still need to perform the normal indexing (via cron or a similar tool). Cheers -- Pat On 02/12/2010, at 5:43 PM, Arun Kumar wrote: > > Hi team, > > This is my second mail to this group, i don't know why it is not published to > the user group, please respond and publish it to the group.... I am using > rails 3.0 and i installed sphinx and added the following to gemfile gem > 'thinking-sphinx', '2.0.0', :require => 'thinking_sphinx'. If i generate the > conditions dynamically it is not working fine (means search query)? > > My structure is like below: > ========================== > > Model: > ===== > > class User < ActiveRecord::Base > include ActionView::Helpers::UrlHelper > > has_one :profile, :class_name => "UserProfile", :dependent => :destroy > > has_many :game_attributes, :dependent => :destroy do > def game(user, gme,dt) > find(:all, :conditions => {:user_id => user.id, :game_id => > gme.id, :date => dt}) > end > end > > has_and_belongs_to_many :interested_game, > :class_name => 'Game', > :join_table => 'interested_game_users', > :order => 'name' > > define_index do > indexes login > indexes email > indexes admin > indexes staff > indexes game_attributes(:name), :as => :ga_name > indexes game_attributes.value, :as => :ga_value > indexes profile.gender, :as => :up_gender > has :id, created_at > end > end > > Controller: > =========== > > Working query: > ============= > "rake ts:in RAILS_ENV=development > rake thinking_sphinx:rebuild RAILS_ENV=development > rake ts:start RAILS_ENV=development > rake ts:stop RAILS_ENV=development" > are working fine... > > > When i put this query " @results = User.search '', :page => params[:page], > :per_page => 10 " in controller, it producing the query, i can able to see > the results. > > [1m [36mUser Load (0.1ms) [0m [1mSELECT `users`.* FROM `users` WHERE > (`users`.`id` IN (272, 275, 280, 281, 282, 283, 288, 289, 290, 291)) [0m > @results [#<User > #.............................................................">] > ==============ThinkingSphinx::Search= length==== 10 > > When i try the below query it will not generate result or produces empty > result...... When i try this same query with rails db console it producing > the data, so we sure that have the data... please help me on this. > > query: > ====== > @results = User.search 'j', :page => params[:page], :per_page => 10, > :conditions => {:ga_gender =>'Female', :login => 'Someusename', :ga_name=> > 'some name', ga_value=>'some value'}, star =>true, :sort_mode => :extended, > :order => "created_at DESC" > > If i generate the conditions dynamically it is not working fine (means search > query)? > > @results = User.search 'j', :page => params[:page], :per_page => 10, > :conditions => {params[:symbol] =>params[:string], params[:symbols] > =>params[:string],'}, star =>true, :sort_mode => :extended, :order => > "created_at DESC" > > > 2. How to implement delta to update thinkg-sphinx automatically for some > period / any document/forums , etc.. > > > Thanks in Advance, > Jak > > -- > 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.
