0

我已按照 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
4

1 回答 1

2

切换到 64 位版本的 Sphinx 为我解决了这个问题。我也使用了 64 位 MySQL,我不知道你的情况是否如此。

于 2012-10-19T00:15:16.500 回答