I have figured it out. I modified vender/plugins/thinking_sphinx/lib/ thinking_sphinx/search.rb.
I modified the following line results = client.query query to results = client.query query, index # index is "buy_sell_file" in this case. If the index is not specified, it's "*" by default, which means all the indices, but the remote index is ignored for some reason. Best wishes, Canvas On May 27, 5:19 pm, Canvas <[email protected]> wrote: > I deleted the following section of configuration in config/ > development.sphinx.conf (local sphinx server) > > index buy_sell_file > { > type = distributed > local = buy_sell_file_core > local = buy_sell_file_delta > agent = 127.0.0.1:9311:buy_sell_file_core > agent = 127.0.0.1:9311:buy_sell_file_delta > charset_type = utf-8 > > } > > And I can still search and get the same result. It seems that this > section is never really in use. No wonder the agent settings does not > work. But why the index is not in use then? > > On May 27, 4:26 pm, Canvas <[email protected]> wrote: > > > > > This topic is related the following post. I created a new post because > > I could not post my reply in the old > > one.http://groups.google.com/group/thinking-sphinx/browse_thread/thread/d... > > > Hi there guys, > > > I manually modifed my config file for distributed index, but it always > > searches the local index, not the remote one. My config is as > > following: > > > 1. config/sphinx.yml > > > development: > > address: 127.0.0.1 > > port: 9312 > > mem_limit: 256M > > ... > > > 2. config/development.sphinx.conf (local sphinx server) > > > indexer > > { > > mem_limit = 256M > > > } > > > searchd > > { > > listen = 127.0.0.1:9312 > > log = /workspace/repo/EconveyancePro/log/searchd_2.log > > query_log = /workspace/repo/EconveyancePro/log/searchd_2.query.log > > read_timeout = 5 > > max_children = 30 > > pid_file = /workspace/repo/EconveyancePro/tmp/pids/ > > searchd_2.development.pid > > max_matches = 1000 > > > } > > > source buy_sell_file_0_core > > { > > ... > > > } > > > source buy_sell_file_0_delta : buy_sell_file_0_core > > { > > ... > > > } > > > index buy_sell_file_core > > { > > source = buy_sell_file_0_core > > path = /workspace/index/EconveyancePro/sphinx_index_2/ > > buy_sell_file_core > > charset_type = utf-8 > > morphology = stem_en > > charset_table = 0..9, A..Z->a..z,a..z, _, -, @, !, $, %, ^, &, > > (, ), +, `, ~, #, U+002C > > enable_star = 1 > > min_prefix_len = 0 > > min_infix_len = 2 > > > } > > > index buy_sell_file_delta : buy_sell_file_core > > { > > source = buy_sell_file_0_delta > > path = /workspace/index/EconveyancePro/sphinx_index_2/ > > buy_sell_file_delta > > > } > > > index buy_sell_file > > { > > type = distributed > > local = buy_sell_file_core > > local = buy_sell_file_delta > > agent = 127.0.0.1:9311:buy_sell_file_core > > agent = 127.0.0.1:9311:buy_sell_file_delta > > charset_type = utf-8 > > > } > > > 3. config/development_1.sphinx.conf ( remote sphinx server) > > > indexer > > { > > mem_limit = 256M > > > } > > > searchd > > { > > listen = 127.0.0.1:9311 > > log = /workspace/repo/EconveyancePro/log/searchd_1.log > > query_log = /workspace/repo/EconveyancePro/log/searchd_1.query.log > > read_timeout = 5 > > max_children = 30 > > pid_file = /workspace/repo/EconveyancePro/tmp/pids/ > > searchd_1.development.pid > > max_matches = 1000 > > > } > > > source buy_sell_file_0_core > > { > > ... > > > } > > > source buy_sell_file_0_delta : buy_sell_file_0_core > > { > > ... > > > } > > > index buy_sell_file_core > > { > > source = buy_sell_file_0_core > > path = /workspace/index/EconveyancePro/sphinx_index_1/ > > buy_sell_file_core > > charset_type = utf-8 > > morphology = stem_en > > charset_table = 0..9, A..Z->a..z,a..z, _, -, @, !, $, %, ^, &, > > (, ), +, `, ~, #, U+002C > > enable_star = 1 > > min_prefix_len = 0 > > min_infix_len = 2 > > > } > > > index buy_sell_file_delta : buy_sell_file_core > > { > > source = buy_sell_file_0_delta > > path = /workspace/index/EconveyancePro/sphinx_index_1/ > > buy_sell_file_delta > > > } > > > index buy_sell_file > > { > > type = distributed > > local = buy_sell_file_core > > local = buy_sell_file_delta > > charset_type = utf-8 > > > } > > > I also added :index => "buy_sell_file" in the controller. The code is > > as following: > > > result_files = BuySellFile.search( > > @full_text_query, > > :index => "buy_sell_file", > > :match_mode => :extended, > > :field_weights => field_weights, > > :with => @filter_conditions_hashtable, > > :page => page, > > :per_page => rows_per_page, > > :order => sort > > ) > > > I have done it the way Sting did it, but it still searches only local > > index. Any idea what is wrong? Thank you very much. > > > Best wishes, > > > Canvas- Hide quoted text - > > - Show quoted text - -- 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.
