简体   繁体   中英

thinking_sphinx ERROR: index column number 1 has no name

I have followed RailsCast #120 to setup Sphinx and thinking_sphinx for a Rails 3 app. I am however using Windows. The index definition in my model looks like this:

define_index do
indexes miniresume, :as => :miniresume
indexes categories.categoryname, :as => :category_name
end

However when I try to run rake:ts --trace, I am getting an error about column 1 not having any name. Any help appreciated.

$ rake ts:index --trace
** Invoke ts:index (first_time)
** Invoke thinking_sphinx:index (first_time)
** Invoke thinking_sphinx:app_env (first_time)
** Execute thinking_sphinx:app_env
** Execute thinking_sphinx:index
Generating Configuration to C:/rails32/pa02/config/development.sphinx.conf
Sphinx 2.0.4-release (r3135)
Copyright (c) 2001-2012, Andrew Aksyonoff
Copyright (c) 2008-2012, Sphinx Technologies Inc (http://sphinxsearch.com)

using config file 'C:/rails32/pa02/config/development.sphinx.conf'...
indexing index 'post_core'...
ERROR: index 'post_core': column number 1 has no name.
total 0 docs, 0 bytes
total 0.083 sec, 0 bytes/sec, 0.00 docs/sec
skipping non-plain index 'post'...
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
** Execute ts:index

Switching to the 64bit version of Sphinx solved this problem for me. I also used the 64bit MySQL, I don't know if that is your case to.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM