thinking-sphinx

Sphinx searcing related has_many with thinkingsphinx

Hypothetically, I have a Room model that belongs to a Building model. Buildings has a has_many relationship with categories. I'm trying to figure out how to index the Room model so that a search for category_id = 1 will return any room, in any building that happens to have that category assigned to it. Again, a building can have multi...

Are Sphinx & thinking_sphinx really stable? Not indexing Columns

I'm encountering strange behaviour from thinking_sphinx/sphinx. My define_index block is about 100 lines, so quite a lot of columns i'm indexing. For full-text searching I only need about 10 attributes, for sorting and filtering I have another approximately 50 columns, mostly floats and integers. By filtering I mean using the "with" or...

Fancy groupings with Thinking Sphinx

I have tables boards, users, joins, and roles. The joins table defines the association a user has to a board, as well as the role that user has on that board. I'm trying to either get all of a user's boards at once with a way to differentiate what role a user has on each board, or make three separate calls to get boards that a user is a ...

Indexing calculated field for search conditions in Thinking Sphinx

I have a products model set up that I am trying to search with Thinking Sphinx. The model has an attribute called status which can be Active, Not active or Active during specified dates. I would like to be able to restrict my search results to products that are active. I.e. has status of active or has status of active during dates and ...

How do I stop ThinkingSphinx from querying the database for faceting an MVA field?

I have a index set up so I can facet on category ids, as following: define_index ... has categorizings.category_id, :type => :multi, :facet => true end When I do a query like Listing.facets, I get the correct results in a hash, with each category_id pointing at its count. :) The only problem is Thinking Sphinx runs a database qu...

Deploying Thinking Sphinx through Capistrano yeilds 'Column number 6 has no name'

I'm not exactly sure where the problem I'm running into is occurring. When I run the deploy task the rake thinking_sphinx:configure works fine, but then when it tries to index it this error occurs: ERROR: index 'board_core': column 6 has no name. ERROR: index 'board_delta': column 6 has no name. ...and so on for all of my indexes and ...

Enabling stemming from sphinx.yml in Thinking Sphinx

I created a config/sphinx.yml file with the line: morphology: stem_en After running rake ts:config, it doesn't seem to have changed development.sphinx.conf, and following a rebuild, searching for "dawg" doesn't match "dawgs". How can I get this to work? ...

Multiple Keyword Search Using Thinking Sphinx Rails Plugin

I'm using the sphinx search engine with the thinking sphinx plugin for rails. I have a job model with a title attribute that is indexed by sphinx. I'd like to search across multiple jobs and capture any that match 1 or more keywords. For instance... Job.search("rails, django, symfony") ...and get an array of job objects with the f...

How do I specify the MySQL sock file location for thinking sphinx?

My socket file is located here: /var/run/mysqld/mysqld.sock When I do: rake thinking_sphinx:start I get: rake aborted! Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2) I want to tell thinking_sphinx where my socket file is. How is this possible? This issue appeared after performing a hard reboot of my sl...

Thinking Sphinx: Missing Attribute for Foreign Key

Hi, I know a very, very similar question has been asked before. The hackish solution to that question doesn't work if I want to chain in more scopes, so I'm asking again here, with a bit more information as to where the issue is coming from. # Relevant code only... class Publication < ActiveRecord::Base has_many :issues has_many :a...

Thinking Sphinx, associations are not working

I have a model: class Topic < ActiveRecord::Base define_index do indexes title, :sortable => true indexes body indexes tags(:name), :as => :tag_name end has_and_belongs_to_many :tags, :join_table => 'topic_tags', :order => 'tags.name asc' end When I run: rake ts:rebuild I get: sql_range_query: Unknown column...

How do I include the capistrano thinking sphinx tasks when using the gem

Im using the gem for thinking sphinx: sudo gem install freelancing-god-thinking-sphinx \ --source http://gems.github.com So: require 'vendor/plugins/thinking-sphinx/recipes/thinking_sphinx' Which is prescribed on the website does not work. How do I include the capistrano thinking sphinx tasks in my deploy.rb file when using th...

categories dropdown for product search

I am having many products with many categories which are associated with has_many using memberships. I am trying to create a search box where any one can search products while also filter their search with a category dropdown (so only products with relevant categories can be retrieved). The thinking_sphinx index is in Product model I d...

How do you search for different conditions from the same join table?

With these associations only the magnification results returns the correct results, but when I try and search for the second association it will return 0 results. has_one :magnification, :class_name => 'ProductAttribute', :foreign_key => 'product_id', :conditions => {:key => 'Magnification'} has_one :objective_lens, :class_name ...

rails - apply complex visibility settings to thinking sphinx results

in the product i'm developing, i have a Message model. Message can be restricted to groups, or not restricted (available to everyone). If user belongs to one of Message's groups OR message is not restricted, user can see the message. here is the query selecting visible messages (in hope that it can clarify what i mean) (2,3,4,5,6,1) ...

Thinking Sphinx delta indexing fails in production

Here's what I've determined: Delta indexing works fine in development Delta indexing does not work when I push to the production server, and no action is logged in searchd.log I'm running Phusion Passenger, and, as recommended in the basic troubleshooting guide, have confirmed that: www-data has permission to run indexing rake tasks (...

sphinx is returning stale results

Environment: Memcached, Rails 2.2.2 + cache_money, Sphinx + thinking sphinx The following yields stale results: - add a record; mysql contains the correct data - the record is probably cached in memory at this point - re-index sphinx - sphinx returns the proper result with the correct data - edit the record - the cache is invalidated p...

How can I make sure the Sphinx daemon runs?

I'm working on setting up a production server using CentOS 5.3, Apache, and Phusion Passenger (mod_rails). I have an app that uses the Sphinx search engine and the Thinking Sphinx gem. According to the Thinking Sphinx docs... If you actually want to search against the indexed data, then you’ll need Sphinx’s searchd daemon to be ...

Sphinx delta indexing -- still necessary to rebuild the main index?

I've been reading up on the Sphinx search engine and the Thinking Sphinx gem. In the TS docs it says... Sphinx has one major limitation when compared to a lot of other search services: you cannot update the fields [of] a single document in an index, but have to re-process all the data for that index. If I understand correctly, that...

Thinking Sphinx - Roats Index Every Time a Model is Updated or Created, How to Stop?

Every-time I create or update a model in my Rails app, the following output occurs from Sphinx: Sphinx 0.9.8.1-release (r1533) Copyright (c) 2001-2008, Andrew Aksyonoff using config file '/Users/jason/development/projects/active/project/config/development.sphinx.conf'... indexing index 'ad_delta'... collected 17 docs, ...