thinking-sphinx

ThinkingSphinx::SphinxError (Unknown MySQL error)

∥☆過路亽.° 提交于 2021-02-08 10:42:50
问题 I try to run gem 'thinking-sphinx' on my Ruby on Rails project, but something was wrong. When I run any search command on any model, I see this error: ThinkingSphinx::SphinxError (Unknown MySQL error). More details: MacOS Mojave -v 10.14.3 mysql -v 8.0.15 (Installed first) Sphinx -v 2.2.11_2 (Installed via 'brew install sphinx') thinking-sphinx -v 4.2.0 Rails -v 5.2.2 Before run search command, I runned rails ts:index and rails ts:start What am I doing wrong? 回答1: Sphinx v2.2 (and 3.0) is not

thinking-sphinx index minimum

时光怂恿深爱的人放手 提交于 2020-01-26 03:20:09
问题 I have a Product & Price models, where: class Product < AR::Base has_many :prices # there are several types of prices, e.g. for guests, users et.c. I want to index and sort products by price values, belonging to this product and exact price_type. ThinkingSphinx::Index.define :product, with: :active_record do indexes name indexes k1c indexes catalogue_code indexes created_at, sortable: true indexes prices(:value), as: :price, sortable: true # TODO has :category_id has :brand_id has :kind_cd

Error while using Thinking Sphinx under Ruby on Rails

雨燕双飞 提交于 2020-01-24 19:33:09
问题 Im using Thinking-Sphinx as a plugin in my RoR app, but Im having this error: undefined method `define_index' for # What could it be? Model class Group < ActiveRecord::Base belongs_to :retailer_product has_many :group_ranges, :dependent => :destroy has_many :group_clients, :dependent => :destroy has_many :group_notifications, :dependent => :destroy define_index do indexes retailer_product.review indexes retailer_product.retailer.retailer_name indexes retailer_product.product.pr_id indexes

sphinxql: syntax error, unexpected IDENT

我与影子孤独终老i 提交于 2020-01-15 12:39:06
问题 Getting this error with sphinx 2 sphinxql: syntax error, unexpected IDENT, expecting CONST_INT or CONST_FLOAT or '-' near 'WI AND published = 1 AND sphinx_deleted = 0 LIMIT 0, 10; SHOW META' index.html.erb error is being thrown in the template at the line of a partial collection: @posts_by_state, but two other instances of the same partial are working great. The State sort is what is throwing it off. posts_controller.rb @posts_by_state = Post.search(params[:search], with: { state: current

Thinking Sphinx after deployment - ThinkingSphinx::SphinxError (unknown local index 'user_core' in search request):

雨燕双飞 提交于 2020-01-15 10:48:04
问题 I check this topic: Sphinx error: unknown local index "INDEX_NAME" in search request , but it's closed and it's not resolve problem in my rails application. I update TS to 3.0.2, and include it to deploy.rb. I also change code in model. Now it works in development, and some examples work in test, and some not. But after successful deployment I get error: ThinkingSphinx::SphinxError (unknown local index 'user_core' in search request): I try rebuild, restart, and other things, but it doesn't

Thinking sphinx doesn't start - “Failed to start searchd daemon”

一世执手 提交于 2020-01-12 07:33:27
问题 I try to start thinking sphinx on my server but it doesn't want to work. I do: $ rake thinking_sphinx:index && rake thinking_sphinx:start And i get: Generating Configuration to /vol/www/apps/ror_tutorial/releases/20120202111730/config/development.sphinx.conf Sphinx 2.0.3-release (r3043) Copyright (c) 2001-2011, Andrew Aksyonoff Copyright (c) 2008-2011, Sphinx Technologies Inc (http://sphinxsearch.com) using config file '/vol/www/apps/ror_tutorial/releases/20120202111730/config/development

searching multiple polymorphic items using thinking sphinx

最后都变了- 提交于 2020-01-05 02:35:26
问题 I have an attachments table that has multiple values (via polymorphic assoc). I'd like to be able to search for multiple values (like an AND in SQL) via thinking-sphinx. For example: class FieldValue < ActiveRecord::Base belongs_to :customized, :polymorphic => true end class Attachment < ActiveRecord::Base has_many :field_values, :as => :customized, :dependent => :destroy define_index do has field_values.field_id, :as => :field_ids, :type => :multi indexes field_values.value, :as => :field

Deep association and Sphinx index with Thinking Sphinx?

大憨熊 提交于 2020-01-04 16:01:06
问题 Currently I have the ff table: Teams id Team_User team_id, user_id Users user_id Item id team_id And the ff. model: Team has_and_belongs_to_many :users User has_and_belongs_to_many :teams Item belongs_to :audit_team, :class_name => "Team", :foreign_key => "team_id" Why I am trying to archive is to get Sphinx to index all the user_id that associate with Item and I came up with this index definition: define_index do has audit_team.users(id), :as => :team_users end I am not sure if this is

Deep association and Sphinx index with Thinking Sphinx?

我与影子孤独终老i 提交于 2020-01-04 16:00:50
问题 Currently I have the ff table: Teams id Team_User team_id, user_id Users user_id Item id team_id And the ff. model: Team has_and_belongs_to_many :users User has_and_belongs_to_many :teams Item belongs_to :audit_team, :class_name => "Team", :foreign_key => "team_id" Why I am trying to archive is to get Sphinx to index all the user_id that associate with Item and I came up with this index definition: define_index do has audit_team.users(id), :as => :team_users end I am not sure if this is

Sphinx returning bad search results

为君一笑 提交于 2020-01-02 04:04:10
问题 I am using Sphinx with the Thinking Sphinx plugin. I have indexed a model called Venue with the following code (and the rake thinking_sphinx:index command) define_index do indexes :name indexes city indexes zip end I obtain the results in my controller with this code: @venues = Venue.search params[:search] and I render them as json. The problem I have is that when I hit this URL: http://localhost:3000/venue/list?search=Baltimo I get nothing. But when I hit this URL: http://localhost:3000