我正在尝试从SQL Server索引一些数据,并且对此没有运气:
ubuntu 16.04
apt-get install sphinxsudo add-apt-repository ppa:builds/sphinxsearch-rel22
apt-get update
apt-get install sphinxsearch
/etc/sphinxsearch/sphinx.conf
source src1
{
# data source type. mandatory, no default value
# known types are mysql, pgsql, mssql, xmlpipe, xmlpipe2, odbc
type = mssql
#####################################################################
## SQL settings (for 'mysql' and 'pgsql' types)
#####################################################################
# some straightforward parameters for SQL source types
sql_host = 192.168.*.*
sql_user = ****
sql_pass = ****
sql_db = DatabaseName
sql_port = 1433 # optional, default is 3306
...
}
indexer -all
Sphinx 2.2.9-id64-release (rel22-r5006)
Copyright (c) 2001-2015, Andrew Aksyonoff
Copyright (c) 2008-2015, Sphinx Technologies Inc (http://sphinxsearch.com)
using config file '/etc/sphinxsearch/sphinx.conf'...
indexing index 'test1'...
ERROR: source 'src1': unknown type 'mssql'; skipping.
ERROR: index 'test1': failed to configure some of the sources, will not index.
毕竟我尝试从源头编译sphinx,但是在配置文件中没有with-mssql
选项:
Optional Packages:
--with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
--without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
--with-debug compile slower debug version (default is disabled)
--with-assert compile optimized build but with debugging
assertions (default is disabled)
--with-mysql compile with MySQL support (default is enabled)
--with-static-mysql link statically with MySQL library (default is no)
--with-mysql-includes path to MySQL header files
--with-mysql-libs path to MySQL libraries
--with-syslog compile with possibility to use syslog for logging
(default is yes)
--with-pgsql compile with PostgreSQL support (default is
disabled)
--with-static-pgsql link statically with PostgreSQL library (default is
no)
--with-pgsql-includes path to PostgreSQL header files
--with-pgsql-libs path to PostgreSQL libraries
--with-libstemmer compile with libstemmer support (default is
disabled)
--with-libexpat compile with expat XML library suppport (default is
autodetect)
--with-re2 compile with RE2 library support (default is
disabled)
--with-re2-includes path to RE2 header files
--with-re2-libs path to RE2 libraries
--with-rlp compile with RLP library support (default is
disabled)
--with-iconv compile with iconv support (default is autodetect)
--with-unixodbc compile with UnixODBC support (default is
autodetect)
是否有机会使SphinxSearch能够从SQL Server索引数据?感谢您的关注和答案!祝您有美好的一天!
我认为MSSQL驱动程序仅在Windows构建上工作。从历史上看,MSSQL无法用于Linux,因此驱动程序从未在Linux上实现。
也许可以使用ODBC驱动程序(我认为是http://www.unixodbc.org/)
找到以下内容:http://www.unixodbc.org/doc/freetds.html