Questions tagged [thinking-sphinx]

Thinking Sphinx is a Ruby library that connects ActiveRecord models to the Sphinx search service.

Thinking Sphinx is a Ruby library that connects ActiveRecord models to the Sphinx search service.

Sphinx is a very fast search engine that indexes data and provides flexible ways of searching it. Thinking Sphinx allows you to link up your models into Sphinx simply and painlessly, and provides an interpretation of search results into ActiveRecord model instances.

875 questions
2
votes
1 answer

Ordering ThinkingSphinx.search results

Has anyone been able to sort search results from an application-wide ThinkingSphinx query? I have the following setup: class Resource < ActiveRecord::Base # ... define_index do indexes :title, :as => :sortable_name, :sortable => true …
dearlbry
  • 3,193
  • 2
  • 23
  • 23
2
votes
1 answer

Thinking Sphinx Faceted Search Implementation Examples?

I am putting together a repository-type rails 3 site. I have Thinking Sphinx installed and working on my site, insomuch as I can enter urls like localhost:3000/articles?search=test&page=2 and it will return the expected results. I'm new to Rails…
Zach Kemp
  • 11,736
  • 1
  • 32
  • 46
2
votes
1 answer

Using Delta Indexes for associations in Thinking Sphinx

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…
Claudio Acciaresi
  • 31,951
  • 5
  • 33
  • 43
2
votes
1 answer

uninitialized constant ThinkingSphinx::Deltas::DelayedDelta

I'm attempting to get Thinking Sphinx working w/ Delayed Jobs but I am not having any success. I keep getting the following error: uninitialized constant ThinkingSphinx::Deltas::DelayedDelta I have thinking-sphinx (2.0.2), delayed_job (2.1.3), and…
Kyle Decot
  • 20,715
  • 39
  • 142
  • 263
2
votes
2 answers

Thinking Sphinx group options

Ok so i have 4 models that I am searching on in one search like this #category model define_index do indexes :name, :description, :tag indexes sub_categories.name, :as => :subcategory_name end #pattern model define_index do indexes :name,…
Matt Elhotiby
  • 43,028
  • 85
  • 218
  • 321
2
votes
2 answers

Thinking Sphinx display options

Ok so i have a graphic model and I am using thinking sphinx as the search tool. It works well but i want to display different models on the search results page.. for example i have this in my Graphic model define_index do indexes :name,…
Matt Elhotiby
  • 43,028
  • 85
  • 218
  • 321
2
votes
2 answers

Thinking Sphinx : Error while indexing

indexing index 'users_core'... ERROR: index 'users_core': sql_range_query: Incorrect key file for table '/tmp/#sql_ff2_0.MYI'; try to repair it (DSN=mysql://root:*@localhost:3306/myname) What does this means ? I can't find the file…
Krishna Prasad Varma
  • 4,670
  • 5
  • 29
  • 41
2
votes
2 answers

Rails 3 Search: Searchlogic vs Thinking_Sphinx

In the past, I have used thinking_sphinx with Rails 2.3 and I found no problems with it. Is it worth considering a new search option? What are the differences between searchlogic and thinking_sphinx? Is there a better alternative for Rails 3? I am…
amaseuk
  • 2,147
  • 4
  • 24
  • 43
2
votes
1 answer

Rails + Thinking-Sphinx polymorphic association

class User < ActiveRecord::Base has_many :followings, :as => :followable, :dependent => :destroy, :class_name => 'Follow' has_many :follows, :as => :follower, :dependent => :destroy define_index do has follows.followable(:id), :as =>…
xpepermint
  • 35,055
  • 30
  • 109
  • 163
2
votes
1 answer

Configure thinking sphinx with morphology other than english or russian

I need to configure thinking sphinx with Spanish stemming and I can't get it to work. I learned [1] that I needed to compile the sphinx source code with the libstemmer_c library and install it. Additionally, I had to change the configuration of…
forste
  • 1,103
  • 3
  • 14
  • 33
2
votes
1 answer

Sphinx indexer custom query for sql_attr_multi

I managed to have a query for getting all the friends and friends of friends of a particular user. I have a users table and a friendships join table. For simplicity, lets just say that the users table only has a primary key. The friendships table…
Lester Celestial
  • 1,454
  • 1
  • 16
  • 26
2
votes
1 answer

Rails + Thinking-Sphinx result ids

Hey. I use Rails 3.0.1 with thinking-sphinx. How can I get a list of IDs from a sphinx request? If I do MyModel.search('boby').map(&:id) it makes a request to the database which is redundant.
xpepermint
  • 35,055
  • 30
  • 109
  • 163
2
votes
1 answer

Delta indexes not working on servers when using Thinking Sphinx

I'm using delta indexing for my Thinking Sphinx indexes in my Rails project. In my machine (Mac OS X) it's working fine. I change a record and it immediately finds it. On the servers (Debian) it doesn't. I did run a sql query for delta = true and…
Pablo Fernandez
  • 279,434
  • 135
  • 377
  • 622
2
votes
1 answer

Thinking Sphinx Combining :with parameters

I was wondering how I could combine the result sets of Thinking Sphinx I have the following query: Model.search :with => {:attribute_1 => id} Which I want to combine with: Model.search :with => {:attribute_2 => id} Is there a neat way to do this…
Lester Celestial
  • 1,454
  • 1
  • 16
  • 26
2
votes
2 answers

Thinking Sphinx without condition on 'id'

According to the documentation on Thinking Sphinx it should be possible to add a filter condition on id, but the following code does not give any results: User.search(:without => {:id => [1,3]}) What am I doing wrong? Is there another way of doing…
huug
  • 1,059
  • 2
  • 11
  • 25