thinking-sphinx

Sphinx Search mysql client on production server

随声附和 提交于 2019-12-10 12:14:49
问题 I want to connect to SphinxQL on my production server to execute sphinx queries on mysql database, Please note I ran the following commands in the production server terminal(Ubuntu 10.04) by connecting to it remotely. mysql -h 127.0.0.1 -P 9312 mysql -h 127.0.0.1 -P 9306 mysql -h <<my_production_ip_address>> -P 9312 mysql -h <<my_production_ip_address>> -P 9306 Tried changing the bind_address in /etc/mysql/my.cnf to my_production_ip_address. I want to run a sphinx query on my production

Sphinx Daemon returned error: index product_core: INTERNAL ERROR: incoming-schema mismatch. Only on staging server

老子叫甜甜 提交于 2019-12-10 10:23:47
问题 The application is using Rails 2.3.12 and ThinkingSphinx 1.4.11 . There is only one index on Product model and it is working OK on devel box. After cap staging deploy I am generating config on the server, creating index, and starting daemon: bundle exec rake ts:conf RAILS_ENV=staging bundle exec rake ts:index RAILS_ENV=staging bundle exec rake ts:start RAILS_ENV=staging After going to rails console I'm getting: >> Product.search('music') Sphinx Sphinx Daemon returned error: index product_core

Using Delta Indexes for associations in Thinking Sphinx

╄→尐↘猪︶ㄣ 提交于 2019-12-09 01:38:29
问题 I have a Product model: class Product < ActiveRecord::Base belongs_to :subcategory define_index do # fields indexes subcategory.name, :as => :subcategory, :sortable => true, :facet => true # attributes has subcategory_id, created_at, updated_at #properties set_property :delta => true Now, suppose that a user updates a subcategory name, which is the proper way to update the products delta index? According to this documentation: http://freelancing-god.github.com/ts/en/deltas.html, a save

thinking sphinx error when rake thinking_sphinx:start

淺唱寂寞╮ 提交于 2019-12-08 18:40:30
I am using gem 'thinking-sphinx', '2.0.10' for search functionality.I am following http://railscasts.com/episodes/120-thinking-sphinx tutorial for this. script/plugin install git://github.com/freelancing-god/thinking-sphinx.git rake thinking_sphinx:index These 2 steps executed without any problem,but when i did rake thinking_sphinx:start it was giving following error : Failed to start searchd daemon. Check /home/user/newsvn/alumnicell/log/searchd.log. Failed to start searchd daemon. Check /home/user/newsvn/alumnicell/log/searchd.log I searched on net about this but even trying many solutions i

thinking sphinx automatic indexing

喜欢而已 提交于 2019-12-08 12:18:59
问题 How can I do automatic indexing for thinking sphinx or it will keep on indexing new records (added/deleted) automatically. Or I have to run rake ts:index as per my needs like after 2hours or after 1 day. If I have to run, whats the best way to do that? 回答1: To reindex periodically, use whenever : http://railscasts.com/episodes/164-cron-in-ruby 来源: https://stackoverflow.com/questions/6844251/thinking-sphinx-automatic-indexing

Searching for hash tag via thinking sphinx

大兔子大兔子 提交于 2019-12-08 11:13:16
问题 Is it possible to search hash tag via thinking_spinx? Can't find solution. Need to find all titles with hash tag only: "title#text","#text", etc. 回答1: You'll want to make sure Sphinx is indexing the hash character - which is done via the charset_table setting. Thinking Sphinx finds this value in config/sphinx.yml (create it if you haven't already), which is set up via environments, much like config/database.yml . development: charset_table: "0..9, A..Z->a..z, _, a..z, \#, U+410..U+42F->U+430.

Loading data from associated model in same query in rails

青春壹個敷衍的年華 提交于 2019-12-07 14:03:11
问题 Basically, I have a Listing model, where each listing has a country id. I need the country name in my search results view. I know I can do @listing.country.name , but this performs an extra query for each listing in my search results. I'm using Thinking Sphinx, and in my controller I have @listings = Listing.search(@ts_params).page(page_num).per(limit) I have tried adding .includes(:countries) and variations thereof but no luck. What's the best way to go about this? I want the country data to

Searching with thinking_sphinx and filtering results

自古美人都是妖i 提交于 2019-12-06 15:33:04
问题 I have this scenario where I thought it would be pretty basic, but found out that I can't really achieve what I need. This is why I have this question for a thinking_sphinx's expert. The scenario is this: I need do a search within a list of companies and only return those who has an address (there can be many address by company) which belongs to a particular city or none at all (this I can do). I have the following models : class Company < ActiveRecord::Base has_many :company_addresses define

How do I geo-search multiple models with ThinkingSphinx?

前提是你 提交于 2019-12-06 14:18:15
问题 I have two models indexed for searching (User and Item). I'm trying to do a geo-search across models: ThinkingSphinx::Search.search('keywords', :geo => [ degrees_to_radians(params[:lat].to_f), degrees_to_radians(params[:lon].to_f) ], ) But I only get an error: Sphinx Error: index item_core,item_delta,user_core,user_delta: unknown latitude attribute '' Searching each model individually works fine... but I've no idea what the problem here is. Here are the indexes: User Index: define_index do

Sphinx with metaphone and wildcard search

送分小仙女□ 提交于 2019-12-06 12:52:17
we are an anatomy platform and use sphinx for our search. We want to make our search more fuzzier and started to use metaphone to correct spelling mistakes. It finds for example phalanges even though the search word is falanges . That's good but we want more. We want that the user could type in falange or even falang and we still find phalanges . Any ideas how to accomplish this? If you are interested you can checkout our sphinx config file here . Thanks! Well you can enable both metaphone and min_prefix_len on an index at once. It will sort of work. falange* might then just work. (to match