狮身人面像宣称与postgres合作,但我没有运气。我安装了最新的思考 - sphinx gem,并安装了sphinx本身的mysql和postgres。当我尝试构建索引时,我仍然会收到错误,如下所示:
ERROR: source 'user_core_0': unknown type 'pgsql'; skipping.
完整追踪:
> rake ts:index
Generating configuration to /.../config/development.sphinx.conf
Sphinx 2.2.6-id64-release (r4843)
Copyright (c) 2001-2014, Andrew Aksyonoff
Copyright (c) 2008-2014, Sphinx Technologies Inc (http://sphinxsearch.com)
using config file '/.../config/development.sphinx.conf'...
WARNING: key 'sql_query_info' was permanently removed from Sphinx configuration. Refer to documentation for details.
WARNING: key 'charset_type' was permanently removed from Sphinx configuration. Refer to documentation for details.
indexing index 'user_core'...
ERROR: source 'user_core_0': unknown type 'pgsql'; skipping.
ERROR: index 'user_core': failed to configure some of the sources, will not index.
skipping non-plain index 'user'...
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
修改 我认为sphinx应该有pgsql支持。我是如何安装狮身人面像的:
> brew remove sphinx
Uninstalling /usr/local/Cellar/sphinx/2.2.6...
> brew install sphinx --mysql --pgsql
==> Downloading http://sphinxsearch.com/files/sphinx-2.2.6-release.tar.gz
Already downloaded: /Library/Caches/Homebrew/sphinx-2.2.6.tar.gz
==> Cloning https://github.com/snowballstem/snowball.git
Updating /Library/Caches/Homebrew/sphinx--stemmer--git
==> Checking out revision 9b58e92c965cd7e3208247ace3cc00d173397f3c
==> make dist_libstemmer_c
==> tar xzf dist/libstemmer_c.tgz -C /private/tmp/sphinx-oTMP63/sphinx-2.2.6-release
==> ./configure --prefix=/usr/local/Cellar/sphinx/2.2.6 --localstatedir=/usr/local/var --with-libstemmer --with-mysql --with-pgsql
==> make install
==> Caveats