Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 718023
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T05:28:45+00:00 2026-05-14T05:28:45+00:00

I installed Sphinx and Thinking Sphinx on ruby-on-rails 2.3.2 and on Windows 7 pc.

  • 0

I installed Sphinx and Thinking Sphinx on ruby-on-rails 2.3.2 and on Windows 7 pc.

First of all, if I run rake ts:start, it won’t start at all. It keep saying “Starting…” and it never starts. Even though, the simple search(with no filtering nor conditions) works fine. When I try to add a filter, it won’t return any record.

My model looks like this:

class Announcement < ActiveRecord::Base

  belongs_to :announcement_type
  belongs_to :user
  belongs_to :province
  has_many :announcement_favorites
  has_many :announcement_comments
  has_many :announcement_subscriptions
  has_many :announcement_views
  acts_as_taggable_on :tags #,:category

  validates_presence_of :title, :description, :expirationDate

  define_index do
    indexes title, :as => :title, :sortable => true
    indexes description, :as => :description, :sortable => true

    has province_id, :as => :province_id
  end

And I’m searching this way:

Announcement.search params[:announcement][:search].to_s, :with => {:province_id => 1} ,:page => params[:page], :per_page => 10

Based on all the great documentation Thinking Sphinx has, and all the posts I’ve read about it, I can’t understand what I’m doing wrong.

I just want to clarify that after I modify the index, I run the rake ts:index, ts:config commands and then I restart the searchd windows service just in case, and so the application, just to make sure everything is refreshed.

Thanks in advance,

Brian

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-14T05:28:45+00:00Added an answer on May 14, 2026 at 5:28 am

    I thought it was :conditions => {:province_id => 1} instead

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.