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 894581
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T14:24:53+00:00 2026-05-15T14:24:53+00:00

Error i m getting is:- mohit@mohit-laptop ~/Desktop/code $ rake thinking_sphinx:index (in /home/mohit/Desktop/code) Generating Configuration

  • 0

Error i m getting is:-

mohit@mohit-laptop ~/Desktop/code $ rake thinking_sphinx:index
(in /home/mohit/Desktop/code)
Generating Configuration to /home/mohit/Desktop/code/config/development.sphinx.conf
Sphinx 0.9.9-release (r2117)
Copyright (c) 2001-2009, Andrew Aksyonoff

using config file '/home/mohit/Desktop/code/config/development.sphinx.conf'...
indexing index 'question_core'...
ERROR: index 'question_core': sql_query_range: : macro '$start' not found in match fetch query.
total 0 docs, 0 bytes
total 0.003 sec, 0 bytes/sec, 0.00 docs/sec
distributed index 'question' can not be directly indexed; skipping.
total 0 reads, 0.000 sec, 0.0 kb/call avg, 0.0 msec/call avg
total 0 writes, 0.000 sec, 0.0 kb/call avg, 0.0 msec/call avg

My model:-

class Question < ActiveRecord::Base
belongs_to :user
has_many :comments, :as => :commentable, :dependent => :destroy
has_many :answers, :dependent => :destroy
has_many :votes, :as => :votable, :dependent => :destroy

  define_index do
   indexes content
   indexes title
   indexes answers.content, :as=>:answer_content
   indexes [user.first_name + user.last_name], :as=>:user_name
 end
end

EDIT

development.sphinx.conf

indexer
{
}

searchd
{
  listen = 127.0.0.1:9312
  log = /home/mohit/Desktop/code/log/searchd.log
  query_log = /home/mohit/Desktop/code/log/searchd.query.log
  pid_file = /home/mohit/Desktop/code/log/searchd.development.pid
}

source question_core_0
{
  type = mysql
  sql_host = localhost
  sql_user = root
  sql_pass = google
  sql_db = qna_development
  sql_sock = /var/run/mysqld/mysqld.sock
  sql_query_pre = SET NAMES utf8
  sql_query_pre = SET TIME_ZONE = '+0:00'
  sql_query = SELECT SQL_NO_CACHE `questions`.`id` * 1 + 0 AS `id` , `questions`.`content` AS `content`, `questions`.`title` AS `title`, GROUP_CONCAT(DISTINCT IFNULL(`answers`.`content`, '0') SEPARATOR ' ') AS `answer_content`, `questions`.`#<ThinkingSphinx::Index::FauxColumn:0xb6d535c0>` AS `user_name`, `questions`.`id` AS `sphinx_internal_id`, 1333865240 AS `class_crc`, 0 AS `sphinx_deleted` FROM `questions`    LEFT OUTER JOIN `answers` ON answers.question_id = questions.id  WHERE `questions`.`id` >= $start AND `questions`.`id` <= $end GROUP BY `questions`.`id`  ORDER BY NULL
  sql_query_range = SELECT IFNULL(MIN(`id`), 1), IFNULL(MAX(`id`), 1) FROM `questions` 
  sql_attr_uint = sphinx_internal_id
  sql_attr_uint = class_crc
  sql_attr_uint = sphinx_deleted
  sql_query_info = SELECT * FROM `questions` WHERE `id` = (($id - 0) / 1)
}

index question_core
{
  source = question_core_0
  path = /home/mohit/Desktop/code/db/sphinx/development/question_core
  charset_type = utf-8
}

index question
{
  type = distributed
  local = question_core
}
  • 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-15T14:24:54+00:00Added an answer on May 15, 2026 at 2:24 pm

    Ya i got it 🙂

      indexes [user.first_name + user.last_name], :as=>:user_name
    

    Syntax mistake. its

    indexes [user.first_name , user.last_name], :as=>:user_name
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 454k
  • Answers 454k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer In addition to Stephen's answer, I can say that #define… May 15, 2026 at 9:49 pm
  • Editorial Team
    Editorial Team added an answer That's done with the help of AsyncTask (an intelligent backround… May 15, 2026 at 9:49 pm
  • Editorial Team
    Editorial Team added an answer Silly of me to come up with a solution just… May 15, 2026 at 9:49 pm

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

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.