我已经关注RailsCast#120为Rails 3应用程序设置Sphinx和thinking_sphinx。不过我正在使用Windows。我的模型中的索引定义如下所示:
define_index do
indexes miniresume, :as => :miniresume
indexes categories.categoryname, :as => :category_name
end
然而,当我尝试运行rake:ts --trace时,我收到有关第1列没有任何名称的错误。任何帮助表示赞赏。
$ 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
答案 0 :(得分:2)
切换到64位版本的Sphinx为我解决了这个问题。我也使用了64位MySQL,我不知道你的情况是否属实。