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
0 answers

Calculating date in thinking sphinx condition

I'm currently using rails 3.1, sphinx and thinking sphinx for my search app. My model has two fields which I define as sphinx attributes: define_index do has availability_period # number of days has availability_date end I want to search by…
Johny
  • 1,441
  • 10
  • 26
2
votes
7 answers

Rails: Integration testing thinking_sphinx with cucumber and webrat - how do I index transactional fixtures?

I'd like to have some Cucumber/webrat integration tests of my search features that use thinking_sphinx & sphinx but the problem is that the data is loaded and then rolled back in a transaction during a typical cucumber test so there is no way for…
srboisvert
  • 12,679
  • 15
  • 63
  • 87
2
votes
2 answers

searching multiple polymorphic items using thinking sphinx

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,…
2
votes
2 answers

Optimizing / Caching Event Occurrences In Searchable Way

In my Ruby on Rails application I am building a calendar with Fullcalendar JQuery plugin for the views and using the Icecube gem to calculate event recurrence. I also use Thinking Sphinx for search. The users can have many calendars each with their…
JDutil
  • 3,622
  • 25
  • 32
2
votes
1 answer

Can Thinking Sphinx be used with SQlite3?

I know Sphinx requires you to have MySQL but is it possible to have the MySQL server running and still use the SQLite3 Database for Thinking Sphinx and the rest of my application until I go into production? I'm confused on if you only can use MySQL…
LearningRoR
  • 26,582
  • 22
  • 85
  • 150
2
votes
2 answers

ThinkingSphinx using RSpec, error: "Failed to start searchd daemon."

I have a problem with running Sphinx in test As that was shown in the example ThinkingSphinx I start the test with ThinkingSphinx::Test.start and end with ThinkingSphinx::Test.stop The head section of test file contains require…
com
  • 2,606
  • 6
  • 29
  • 44
2
votes
7 answers

How do I start the sphinx daemon automatically when my rails application loads?

I am aware of the command to start the sphinx daemon manually. I use a rake task: "rake thinking_sphinx:start" Is it possible to have it start whenever my rails application loads so I don't have to manually type in the command every time?
Tony
  • 18,776
  • 31
  • 129
  • 193
2
votes
2 answers

Solr Vs. Sphinx in a Ruby project

I have a project that is being written on top of the Grape API framework in ruby. (https://github.com/intridea/grape) The problem I'm having is that Thinking-Sphinx vs. Sunspot (Gems used to interface with each search index) have worlds different…
Robert Ross
  • 1,895
  • 2
  • 23
  • 32
2
votes
1 answer

ThinkingSphinx returns no results when in test mode in Cucumber

I'm on a project upgrading from Rails 2 -> 3. We are removing Ultrasphinx (which is not supported in Rails 3) and replacing it with ThinkingSphinx. One problem - the Cucumber tests for searching, which used to work, are failing as ThinkingSphinx is…
2
votes
1 answer

Conditional "OR" in thinking sphinx search with filtering by date range

I have problem with connecting conditional OR with filterint by date range. Something like that #pseudo SQL syntax (@date_start < params[:date_to_search] < @date_end) && (@every_day==1 || @day_of_week== params[:day]) -- class OfferTime <…
nothing-special-here
  • 11,230
  • 13
  • 64
  • 94
2
votes
1 answer

Cancan Thinking Sphinx current_ability Questions

trying to get cancan working with thinking sphinx but running into some issues. Before using sphinx, I had this in my companies view: @companies = Company.accessible_by(current_ability) That prevented my users from seeing anyone else's…
Jenny Blunt
  • 1,576
  • 1
  • 18
  • 41
2
votes
0 answers

thinking_shpinx, sphinx and MacOS X 10.6.7

After installing thinking_sphinx (http://freelancing-god.github.com/ts), and Sphinx (via brew - v.0.9.9-release (r2117) or via latest sources) and setting up ts in Rails3 (Ruby via RVM: ruby-1.9.2-p180 [ x86_64 ], rails 3.0.7) app like: …
There Are Four Lights
  • 1,406
  • 3
  • 19
  • 35
2
votes
1 answer

Thinking Sphinx rebuilding index - high CPU load

I have a CRON job rebuilding Sphinx index every 5 minutes: */5 * * * * cd /var/www/my_app && /usr/local/bin/ruby /usr/local/bin/rake RAILS_ENV=production ts:rebuild >> /var/www/my_app/log/cron_log.log It's indexing only one table with around 400…
Vincent
  • 16,086
  • 18
  • 67
  • 73
2
votes
1 answer

Thinking sphinx sorting on multiple fields

I am searching for the model Projects. Projects belongs_to Companies, so all Projects in the list can have the same Company attached to it. An example of a result list: CompanyA - ProjectA CompanyA - ProjectO CompanyA - ProjectC CompanyA -…
miccet
  • 1,870
  • 3
  • 19
  • 26
2
votes
1 answer

ThinkingSphinx: Run SQL String Through Association

I'm trying to get a geo search to work via an association. Very similar to this fellow: How do I geo-search multiple models with ThinkingSphinx? The one difference is that I'm trying to combine the association syntax with custom SQL syntax. It…
brandon
  • 528
  • 1
  • 4
  • 6